Will nested CSS support mixing properties and nested rules in any order, or do all the nested rules have to grouped together at the end? Right now, I frequently write SCSS rules like this: .some-class { background: blue; &:hover {background: red} border: 1px solid; &:active {border: 1px dashed} padding: 16px; display: flex; gap: 8px; & > * { color: red; } } And it would be a pity if that wasn't allowed. The reason I…
WebKit Supports Nested CSS
11–20 of 183 posts
Re: WebKit Supports Nested CSS
#12Will nested CSS support mixing properties and nested rules in any order, or do all the nested rules have to grouped together at the end? Right now, I frequently write SCSS rules like this: .some-class { background: blue; &:hover {background: red} border: 1px solid; &:active {border: 1px dashed} padding: 16px; display: flex; gap: 8px; & > * { color: red; } } And it would be a pity if that wasn't allowed. The reason I…
Re: WebKit Supports Nested CSS
#13Isn't it interesting how the engine has been implementing new features and generally running on a lot of steam coincidentally since the EU's Digital Markets Act (which will force other web engines on iOS) went into effect?
Or maybe the dev process and community interactions has always been like this, in which case disregard what I just said and feel free to correct me.
Re: WebKit Supports Nested CSS
#14Is there a PostCSS or similar plugin which enforces this nesting syntax (& required for element selectors) so we can be ready for when this is widely adopted?
One of the main reasons I never used CRA for my miniprojects was because the first thing I always wanted to do was set PostCSS up with nested CSS support which was a pain to do in CRA
Re: WebKit Supports Nested CSS
#15Then again, I'm lucky enough to often work with my own 'hand-crafted', semantic html, and not some div soup generated by a tool.
Re: WebKit Supports Nested CSS
#16Re: WebKit Supports Nested CSS
#17 :is(article) &
That looks hacky at best.The excuse of parsing performance is responsible for so much weird syntax in web standards today. The standards are literally being dragged around by browser vendors' priorities.
I wish they would do it the other way around for once: come up with the cleanest, easiest-for-humans syntax as possible, and tell browser vendors to fix their damn engines. Perhaps this will lead to the development of a new CSS engine that's actually optimized for the latest goodies.
Instead, for the last decade or so, we've only been getting bits and pieces of half-assed imitations of Sass. Better than nothing, of course, but still seriously lacking.
Re: WebKit Supports Nested CSS
#18I don't know anything about WebKit development processes or community management, so please forgive me if I say something wrong. Isn't it interesting how the engine has been implementing new features and generally running on a lot of steam coincidentally since the EU's Digital Markets Act (which will force other web engines on iOS) went into effect? Or maybe the dev process and community interactions has always been…
Safari took a leading role in interop-2022[0] from the very start. So the change in Safari's philosophy stretches back at least to start of 2022, but they've also led the way on adoption of a number of other web standards like the new colorspaces which they've had since 2021 and which Edge and Firefox still don't support (well, FF has a feature flag)
Re: WebKit Supports Nested CSS
#19Will nested CSS support mixing properties and nested rules in any order, or do all the nested rules have to grouped together at the end? Right now, I frequently write SCSS rules like this: .some-class { background: blue; &:hover {background: red} border: 1px solid; &:active {border: 1px dashed} padding: 16px; display: flex; gap: 8px; & > * { color: red; } } And it would be a pity if that wasn't allowed. The reason I…
Why would it not support it?