Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate selector doesn't concat style. #54

Open
JAForbes opened this issue Jun 17, 2019 · 2 comments
Open

Duplicate selector doesn't concat style. #54

JAForbes opened this issue Jun 17, 2019 · 2 comments

Comments

@JAForbes
Copy link

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.

Repro

@porsager
Copy link
Owner

porsager commented Jun 17, 2019

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

@porsager
Copy link
Owner

porsager commented Jun 17, 2019

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.

flems w. new issue

I'll reopen the issue to keep track on that here ;)

@porsager porsager reopened this Jun 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants