home.social

#containerquery — Public Fediverse posts

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

  1. I have a new article out!

    Super Simple Full-Bleed & Breakout Styles
    frontendmasters.com/blog/super - my take on an old problem using modern CSS solutions.

    Using a spooky made up Halloween recipe to illustrate concepts.

    PS @chriscoyier told me to be proud of it 😛

    #CSS #cssLayout #cssGrid #cssVariables #containerQueries #containerQuery #code #web #webDev #webDevelopment #dev #coding #frontend #Halloween

  2. I have a new article out!

    Super Simple Full-Bleed & Breakout Styles
    frontendmasters.com/blog/super - my take on an old problem using modern CSS solutions.

    Using a spooky made up Halloween recipe to illustrate concepts.

    PS @chriscoyier told me to be proud of it 😛

    #CSS #cssLayout #cssGrid #cssVariables #containerQueries #containerQuery #code #web #webDev #webDevelopment #dev #coding #frontend #Halloween

  3. I have a new article out!

    Super Simple Full-Bleed & Breakout Styles
    frontendmasters.com/blog/super - my take on an old problem using modern CSS solutions.

    Using a spooky made up Halloween recipe to illustrate concepts.

    PS @chriscoyier told me to be proud of it 😛

    #CSS #cssLayout #cssGrid #cssVariables #containerQueries #containerQuery #code #web #webDev #webDevelopment #dev #coding #frontend #Halloween

  4. I have a new article out!

    Super Simple Full-Bleed & Breakout Styles
    frontendmasters.com/blog/super - my take on an old problem using modern CSS solutions.

    Using a spooky made up Halloween recipe to illustrate concepts.

    PS @chriscoyier told me to be proud of it 😛

    #CSS #cssLayout #cssGrid #cssVariables #containerQueries #containerQuery #code #web #webDev #webDevelopment #dev #coding #frontend #Halloween

  5. I have a new article out!

    Super Simple Full-Bleed & Breakout Styles
    frontendmasters.com/blog/super - my take on an old problem using modern CSS solutions.

    Using a spooky made up Halloween recipe to illustrate concepts.

    PS @chriscoyier told me to be proud of it 😛

    #CSS #cssLayout #cssGrid #cssVariables #containerQueries #containerQuery #code #web #webDev #webDevelopment #dev #coding #frontend #Halloween

  6. Haven't been posting much coding stuff this past week as I've found it difficult to focus on it given the state of things in my country 😞

    But... I have a new article out!

    Using Container Query Units Relative to an Outer Container frontendmasters.com/blog/using

    Sparked by a question @mattwilcox asked here.

    #CSS #containerQuery #frontend #coding #web #dev #webDev #webDevelopment #code #containerQueryUnits

  7. #tinyCSStip

    Pretty sure I've posted about this before, but a quick search at the morning hours didn't find it, plus I saw someone ask about it yet again¹, so... fixed aspect-ratio box within variable size container!

    Live on @codepen codepen.io/thebabydino/pen/ogv

    ¹here reddit.com/r/css/comments/1hhf

    #CSS #aspectRatio #code #coding #web #frontend #dev #webDevelopment #webDev #containerQuery #containerQueryUnits #container

  8. #tinyCSStip Container queries on the body? Why, when media queries have better support?

    Well, container queries make it an IF depending on the width of the body's content-box.

    That is, subtracting the scrollbar IF we have one (we can't know).

    **Heavily** commented @codepen demo codepen.io/thebabydino/pen/ZEg

    #CSS #container #containerQuery #layout #cssLayout #grid #cssGrid #frontend #code #web #dev #webDev #webDevelopment #coding #containerQueryUnits

  9. 2⃣ feColorMatrix: swap channels ☆ interactive demo, adaptive layout codepen.io/thebabydino/full/QW

    An interactive, responsive demo illustrating how feColorMatrix can be used to swap channels.

    #SVG #filter #svgFilter #responsive #filterEffect #code #coding #frontend #webDev #web #dev #cssGrid #containerQuery #webDevelopment

  10. 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

  11. 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

  12. 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

  13. 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

  14. 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

  15. Extremely annoying #CSS gotcha: container query units seem to be relative to the `content-box` dimensions. And there doesn't seem to be any way to make them relative to the `border-box` dimensions... which is what I need to solve other problems caused by container queries. 😭

    #cssWTF #gotcha #layout #cssLayout #wtf #code #coding #containerQueries #containerQuery #frontend #webDev #webDevelopment

  16. #tinyCSStip Let's say we want a 90° rotated element (like a range input because rotation is the only way we can make it vertical) to fully cover its flexible size (think `clamp()` using `%` values, grid item on a flexible grid and stuff like that) parent.

    We can make this parent a container and use container query units to style our element.

    #css #layout #cssLayout #containerQuery #slider #code #coding #frontend #webDev #webDevelopment

  17. In the final case, when we use the B channel, the only orange parts that aren't almost fully transparent are the white pith and seeds.

    #SVG #filter #svgFilter #CSS #layout #cssLayout #cssGrid #containerQuery #cssVariables #code #coding #frontend #webDev #webDevelopment

  18. When we use the G channel, the white orange pith and seeds, as well as the flesh of the less reddish oranges are the least transparent parts. The aquatic blue background is also less transparent in this case, through still more transparent than when we use the B channel.

    #SVG #filter #svgFilter #layout #CSS #cssLayout #cssGrid #containerQuery #cssVariables #code #coding #frontend #webDev #webDevelopment

  19. When we use the R channel, the oranges are the least transparent (darkest) part (R value higher there as orange is mainly R + some G), especially the whitish pith (which almost maxes out all channels), while the aquatic blue (mostly B + G) background is the most transparent.

    #SVG #CSS #filter #svgFilter #layout #cssLayout #cssGrid #containerQuery #cssVariables #code #coding #frontend #webDev #webDevelopment

  20. A bit on #CSS container query magic: the layout of the result section depends on its width.

    The aspect ratio of the two figures depends on which container width/ layout case we're in and so does the container-query-unit-relative font-size.

    #containerQuery #cssLayout #cssGrid #SVG #filter #svgFilter #code #coding #frontend #webDev #webDevelopment

  21. A lot going on with this in terms of #layout (sections getting rearranged for different viewport widths/ aspect ratios, their internal layouts based on their own widths, icon displayed only if font above a certain size, etc.) so #code is *heavily* commented.

    mastodon.social/@anatudor/1121

    #CSS #SVG #filter #svgFilter #cssLayout #cssGrid #containerQuery #responsive #coding #frontend #webDev #webDevelopment

  22. #CSS #layout is difficult, arranging elements that are container queries (so their internal layouts and aspect ratios change too) on the page for different viewport sizes *and* aspect ratios such that the most important info is always in sight. Scrolling is not an option in this case.

    It's not the code part of it I struggle with...

    #cssLayout #mediaQuery #containerQuery #code #coding #frontend #webDev #webDevelopment