You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have come across a Splinter bug that I have given an attempt of solving myself. In doing so, I definitely have a better understanding of how Splinter is working, which has led me to think that this is instead a feature request.
Here is the problem:
When a variable is declared within a selector block in Sass, it is scoped to be used within all nested selector blocks.
That output from Splinter results in a Sass error as the variable $this is no longer defined in .foo--bar.
For now, the work around is that all Sass variables have to be global variables. Not a bad thing, but scoped variables are really handy.
To me the solution would need to be that either the Sass nesting be maintained like the original code or the variables are stored and injected into the nested selectors when they are half-rendered by Splinter.
The text was updated successfully, but these errors were encountered:
I have come across a Splinter bug that I have given an attempt of solving myself. In doing so, I definitely have a better understanding of how Splinter is working, which has led me to think that this is instead a feature request.
Here is the problem:
When a variable is declared within a selector block in Sass, it is scoped to be used within all nested selector blocks.
e.g.
With standard Sass that would output:
When Splinter is added to the build process however it half-renders the Sass. The output to the split manifest from the example above looks like this:
That output from Splinter results in a Sass error as the variable
$this
is no longer defined in.foo--bar
.For now, the work around is that all Sass variables have to be global variables. Not a bad thing, but scoped variables are really handy.
To me the solution would need to be that either the Sass nesting be maintained like the original code or the variables are stored and injected into the nested selectors when they are half-rendered by Splinter.
The text was updated successfully, but these errors were encountered: