You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey everyone, hope you’re all doing well. I’m not super familiar with the terminology, so it’s possible I might have some terms wrong. This should be the spec.
I was writing some nested CSS and was surprised to find that it was not possible to include group rules and relative selector lists in the same style rule. Basically, I wanted to include a media query for prefers color scheme and a class to force a color scheme on the same line, instead of having to duplicate a bunch of CSS. Hopefully, this example clears things up.
I realize this could be something that looks simple to implement from the outside but is actually very complex. It would definitely make it way easier to have default light or dark styles based on the device's color scheme while allowing the user to override your site. Thanks!
The text was updated successfully, but these errors were encountered:
Hey everyone, hope you’re all doing well. I’m not super familiar with the terminology, so it’s possible I might have some terms wrong. This should be the spec.
I was writing some nested CSS and was surprised to find that it was not possible to include group rules and relative selector lists in the same style rule. Basically, I wanted to include a media query for prefers color scheme and a class to force a color scheme on the same line, instead of having to duplicate a bunch of CSS. Hopefully, this example clears things up.
What if instead of writing:
We could write:
Which would be equivalent to:
I realize this could be something that looks simple to implement from the outside but is actually very complex. It would definitely make it way easier to have default light or dark styles based on the device's color scheme while allowing the user to override your site. Thanks!
The text was updated successfully, but these errors were encountered: