Duplicate selector doesn't concat style.
Opened this issue ยท 2 comments
Hi ๐ apologies if this is intentional behaviour or if this is an existing issue (I couldn't find anything). I've run into this issue a lot recently as I've started using $nest
more and more.
I think the style sheet should just concat. I assume this is tied to bss' mechanism for preventing regenerating duplicate styles across redraws. Maybe the caching mechanism need's to key using the full definition instead of just the selector.
Expected
Duplicate selectors do not prevent non conflicting styles from being applied.
Actual
The same selector cannot be reused, even for non conflicting styles.
Awesome find @JAForbes !
That's certainly not intentional ๐
I'm not using $nest much myself, so that's probably the reason this has gone unnoticed for this long.
It's fixed and released in 1.6.3 now. flems w. fix
Unfortunately the fix that's implemented now might lead to unexpected behavior if you rely on the implicit specificity between multiple overlapping $nest selectors. I think it's better than the previous bug, but I'd much rather defer to css and add multiple identical selectors in the order $nest is called instead of concatting on the same $nest selector.
I'll reopen the issue to keep track on that here ;)