Elektrine lite

← Feed

@ollicle@mastodon.social

Post #2375678

2023-01-05 04:08 UTC

@mia@front-end.social now wondering if html could be a container for body 👀

Replies (1)

  • @mia@front-end.social 2023-01-05 05:16

    @ollicle@mastodon.social Yes! html can be a container, for everything! And I recommend it. :) We couldn't make it the default because it could break some old sites: https://codepen.io/miriamsuzanne/pen/gOjwygB But people shouldn't rely on that propagation behavior, anyway. Container queries on html have several advantages over media queries. In addition to var(), relative units in the query (like ems) are also be resolved on the container. No more "browser default em" calculations in queries!

    Open ##2375679