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 was experimenting a bit with Clay today and found that it allows a nested selector to reference its parent, similar to & in languages like Sass and LESS.
Examples
Nested "self" with refinement
main =do
putCss $do
star # byClass "foo"?do
byClass "bar"&do
width nil
yields
.bar.foo
{
width:0;
}
Nested child
main =do
putCss $do
star # byClass "foo"?do
star # byClass "bar"<?do
width nil
yields
.foo> .bar
{
width:0;
}
The text was updated successfully, but these errors were encountered:
nsaunders
changed the title
Nested rules can't reference parent selector
Nested rules
Mar 16, 2022
I was experimenting a bit with Clay today and found that it allows a nested selector to reference its parent, similar to
&
in languages like Sass and LESS.Examples
Nested "self" with refinement
yields
Nested child
yields
The text was updated successfully, but these errors were encountered: