css-blocks
css-blocks copied to clipboard
Log error when `compose`-ing on a pseudo element.
CSS Blocks should throw an error when trying to use compose in a pseudo element.
/* Src Block */
.other-thing { color: red }
/* In another file */
.my-class::before {
composes: "other-thing";
}
This doesn't make sense since we will try to apply a class to a pseudo element – which can not receive classes.
Alternative: Inject a new selector that will apply the same code block for pseudos. For example, the above could output:
.other-thing, .my-class::before { color: red; }