Closed talyguryn closed 2 years ago
Can you post an input example as a text, so I can copy paste it?
.phone { &_title { width: 500px; @media (max-width: 500px) { width: auto; } body.is_dark & { color: white; } } img { display: block; } } .title { font-size: var(--font); @at-root html { --font: 16px } }
hm, sorry. might be not postcss-nested
problem. i think this is my bad with the wrong order of plugins.
but it is still strange to get this unpacking by postcss-preset-env
🤔
Seems like you are using postcss-nesting
(another plugin, it used by postcss-preset-env
). It based on CSS spec and has another syntax. You need @nest body.is-dark &
(if your selector started not from &
you need @nest
prefix).
Found strange behaviour on my code and tried to test on example. Correct me if I'm wrong please.
Code from readme
✅ OK for
postcss-nested@5.0.1
❌ WRONG for
postcss-nested@5.0.2
-postcss-nested@5.0.6
.postcssrc.yml