Woah, just learned about CSS Container Queries
Woah, just learned about CSS Container Queries.
Big idea: Declare queries that monitor *the size of the component's container* (instead of the entire page).
Result? Components that respond to their container's size! 😍
In Chrome Canary (under flag). Hope this catches on soon!
Thankfully, in React, we don't have to wait for the browsers to catch up. We can monitor container size with a hook! 🔥
https://github.com/wellyshen/react-cool-dimensions
#react