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
Though I totally understand. But is there anyway to customize break points of a component outside with web standard but without any pre-processer?
Seems making variables in :root element [1] accessible for media query is the nearest way. But I am not sure about it.
An example:
I want to define a web component named <responsive-columns>. Its scoped style [2] is like:
Can't use var() for this, even ones set on :root - you can use the results to change what gets set on :root. ^_^
But the more recently-proposed env() function from Apple, which sets up a guaranteed-global variable that doesn't depend on any element, is usable for this.
The background is as: https://stackoverflow.com/questions/40722882/css-native-variables-not-working-in-media-queries discussed.
Though I totally understand. But is there anyway to customize break points of a component outside with web standard but without any pre-processer?
Seems making variables in
:root
element [1] accessible for media query is the nearest way. But I am not sure about it.An example:
I want to define a web component named
<responsive-columns>
. Its scoped style [2] is like:So other developers can use it like:
Thanks.
[1] https://drafts.csswg.org/selectors-3/#root-pseudo
[2] https://drafts.csswg.org/css-scoping-1/#selectors
The text was updated successfully, but these errors were encountered: