picocss / pico

Minimal CSS Framework for semantic HTML
https://picocss.com
MIT License
13.3k stars 384 forks source link

Using $parent-selector variable doesn't fully restrict styles to specified selector. #533

Open dev-willis opened 4 months ago

dev-willis commented 4 months ago

Describe the issue

There seem to be styles that do not have the value of $parent-selector prepended to them. E.g., box-sizing: border-box; is being applied to everything rather than just those elements that are descendants of the parent selector.

Current Behavior

Some elements outside the parent selector are altered by PicoCSS styles.

Expected Behavior

All PicoCSS styles should be applied within the parent selector only.

n3dst4 commented 1 month ago

I've noticed the same here: https://github.com/picocss/pico/blob/6dc6489e69cc1f22daa938ebd38c02400032428c/scss/components/_nav.scss#L13-L16

Happy to make a little PR for this but I'd like confirmation that it's a bug rather than some deep underlying reason that I'm not seeing.