libsass
libsass copied to clipboard
@extend doesn't flatten idempotent selector pseudos
The pseudoclass selectors with selector arguments :matches()
, :any()
, :current()
, :nth-child()
, and :nth-last-child()
are all idempotent, which means that wrapping a selector in multiple layers of the same selector has no additional effect. Because of this, LibSass should flatten these selectors if they're injected into an identical selector via @extend
.
For example, selector-extend(":matches(.c)", ".c", ":matches(.d, .e)")
should return :matches(.c, .d, .e)
but in LibSass it currently returns :matches(.c, :matches(.d, .e))
.