3 ms·
There is a proposed feature in CSS called "container queries" that does exactly this - media queries on the parent container of an element. There are performanc
by onion2k 6y ago
There is a proposed feature in CSS called "container queries" that does exactly this - media queries on the parent container of an element. There are performance concerns and syntax concerns, but they probably will appear in stable versions of browsers in the nearish future.
In the meantime you can enable a version of them in Chrome using a Chrome flag.
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Container_Queries https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Contain...
- PudgePacket 6y agoOh that's awesome, thank you for linking!