Open
Description
If you use silent classes, SASS outputs strange CSS (http://codepen.io/anon/pen/CuFsE)
I created three divs (.test1, .test2, .test3) and applied some silent classes to them:
<div class="test1">
<div class="test1__item"></div>
</div>
<div class="test2">
<div class="test2__item"></div>
</div>
<div class="test3">
<div class="test3__item"></div>
</div>
The CSS output looks like this:
.test2 > .test1__item, .test2 > .test2__item, .test2 > .test3__item { }
If you have a look at the Code (Codepen) you might notice ".test2 > .test1__item" and ".test2 > .test3__item" don't exist (and won't exist in future). I know why this happens (SASS doesn't know my HTML structure), but i'm wondering if there is a "fix" or at least a workaround? The only workaround i can think of is using silent classes only for widths, pull and push classes and use a HTML structure like this instead
<div class="grid test1">
<div class="grid__item test1__item"></div>
</div>
<div class="grid grid--bottom test2">
<div class="grid__item test2__item"></div>
</div>
<div class="grid--middle test3">
<div class="grid__item test3__item"></div>
</div>
This could work, but probably this is a known issue and somebody came up with a better workaround.
Thanks in advance
Metadata
Metadata
Assignees
Labels
No labels