home.social

#cssunits — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #cssunits, aggregated by home.social.

  1. If you want a fixed aspect-ratio element that always touches either the horizontal or vertical edges of its flexible size and aspect ratio wrapper *which does not coincide with the viewport*, you can make the wrapper a container and use container query units.

    Live test on @codepen codepen.io/thebabydino/pen/Exz

    #CSS #cssLayout #layout #container #containerQueries #containerQuery #cssUnits #code #coding #frontend #web #dev #webDev