> but we still run it through sass because enough customers are using Android or older versions of Chrome that don't support the nesting.
How does sass help in this instance?
How does sass help in this instance?
If you want to use CSS Nesting and be backwards compatible with older browsers, the PostCSS plugin postcss-preset-env handles that and lots of other new CSS features that older browsers don't support [2].
.foo {
.bar {
color: red;
}
}
becomes .foo .bar { color: red; }
The first case modern browsers can handle, but versions of Chrome upto some in early 2023 still can't – and that includes a lot of Android installs as I experienced.Once those browser versions roll off we will be able to remove sass altogether.