Created
November 27, 2019 16:20
-
-
Save tomhodgins/16028211d74aeee5daa4093317110253 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Min-width */ | |
.minwidth::observer { | |
observe-resize-width: 300 medium; | |
} | |
.minwidth:observe(resize-width medium) { | |
border-color: limegreen; | |
background: greenyellow; | |
} | |
/* Max-width */ | |
.maxwidth::observer { | |
observe-resize-width: 300 medium; | |
} | |
.maxwidth:not(:observe(resize-width medium)) { | |
border-color: limegreen; | |
background: greenyellow; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Min-width */ | |
.minwidth[--element='{"minWidth": 300}'] { | |
border-color: limegreen; | |
} | |
@supports (--element(".minwidth", {"minWidth": 300})) { | |
[--self] { | |
background: greenyellow; | |
} | |
} | |
/* Max-width */ | |
.maxwidth[--element='{"maxWidth": 300}'] { | |
border-color: limegreen; | |
} | |
@supports (--element(".maxwidth", {"maxWidth": 300})) { | |
[--self] { | |
background: greenyellow; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment