Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
30 views

I want font-size to be 100% of its container width. If the container is 500px then the font-size should be 500px. I am not getting it to work as the heading is breaking out of the container. Am I ...
Vanhorn's user avatar
  • 442
1 vote
2 answers
335 views

I am having an issue with my Next.js app. I upgraded to Tailwind 4 and as I understand the docs, there should be build in support for container queries. But the following code doesn't seem to work: &...
Bexy-Lyn's user avatar
  • 197
3 votes
1 answer
93 views

I want to use a container query to detect the height of the parent div and adjust the child's height accordingly; however, after following tutorials, reading numerous blog posts, and verifying that I ...
Justin Erswell's user avatar
1 vote
0 answers
47 views

I have a div and I want its font-size to be a percentage of its width. I can mark the div with container-type: inline-size;, put in another div and set its font-size in cqw units. It works. Is there a ...
Shtole's user avatar
  • 367
2 votes
1 answer
310 views

Having a page where we require that if container width is below view size then change 5 columns into 2 columns and trying below: .list { background-color: grey; display: grid; grid-gap: 4px; ...
xkeshav's user avatar
  • 54.2k
4 votes
3 answers
209 views

I have a main grid. Its grid items are also containers (container-type: inline-size), which helps with giving them various internal layouts depending on their width. How can I middle align main once ...
Ana's user avatar
  • 37.6k
1 vote
2 answers
724 views

I'm trying to set a CSS custom property within the :root and then change the value depending on the container's size using a container query, but it's not working. Here's an example: <div class=&...
Nicholas Westby's user avatar
2 votes
2 answers
2k views

At the :root level a CSS variable is declared with a value. This variable is used to style elements. Inside a container query a new value is assigned to the variable. The styled elements should change ...
wob's user avatar
  • 23
0 votes
0 answers
186 views

TailwindCss Container Queries prefix with a @ ...but also that's how we reference things in Razor syntax. https://github.com/tailwindlabs/tailwindcss-container-queries How can I use container query ...
Steve McNiven-Scott's user avatar
1 vote
0 answers
1k views

I've got a CSS layout that relies upon CSS grid's minmax(min-content, max-content) for responsively laying out many of its elements. Here's a reduced example: html, body { margin: 0; padding: 0; } ...
Kerrick's user avatar
  • 7,478
0 votes
1 answer
1k views

I'm attempting to use the container query plugin for Tailwind but my container query is breaking (not generating the class) when I add padding to the parent. When I remove it, all of a sudden it works?...
just a user's user avatar
5 votes
2 answers
666 views

Let's consider example of cards with only subgrid feature. body { max-width: 500px; margin: 1rem auto; } .container { display: grid; grid-template-columns: 2fr 1fr; grid-gap: 1rem; } ....
Everettss's user avatar
  • 16.2k
2 votes
1 answer
402 views

Can Bootstrap 5 provide responsive layouts for two columns whose mutual, vertical border can be dragged? Answer: Yes, by reconfiguring Bootstrap to use container queries rather than media queries. ...
bjornte's user avatar
  • 849
4 votes
1 answer
2k views

I am very enthousiastic about container queries. Finally, this CSS featured had landed in all browsers. But, when I create multiple subsequent containers, and I put a absolutely positioned z-indexed ...
Ad van Pinxteren's user avatar
4 votes
2 answers
2k views

AFAIK The of container queries concept is the applying of the conditional CSS rules depending on unknown at advance container size. However, once container-type: size applied (what it required to make ...
Takeshi Tokugawa YD's user avatar
5 votes
0 answers
661 views

Container queries seem like such a great addition to CSS, one that I've been looking forward to for years. But having just started using them, I've run into this issue. @container queries do not fall ...
GusRuss89's user avatar
  • 1,404
-1 votes
2 answers
769 views

Could you explain what makes my pictures disappear ? span, figure { container-type: inline-size; margin: auto; max-width: 10%; float: right; } .image img { max-height: ...
Mehdi Saada's user avatar
2 votes
1 answer
1k views

I have the following CSS: :root { --some-number: 0; } .header-nav { container: header-nav-container / size; } @container header-nav-container (width < calc(400px + (var(--some-number) * ...
AsGoodAsItGets's user avatar
4 votes
1 answer
2k views

I want to add a CSS container query container for my 2nd child in my flexbox where both children are spaced out using space-between but it is not working. My second child goes off-screen and when I ...
Martin Zeltin's user avatar
21 votes
1 answer
6k views

I am trying to use container-type property to set up a container query that will change alignment of child element, when certain height of container is reached. .snackbar { display: flex; ...
mimo's user avatar
  • 6,967
5 votes
1 answer
871 views

I've written an SCSS mixin for creating a series of @container rules: @mixin form-grid-double-size-breakpoint($itemSize, $gapSize) { $breakPoint: $gapSize + $itemSize * 2; @container ...
Michel Reij's user avatar
9 votes
1 answer
4k views

This is a rough mockup from my project. The parent has a container query, while the child is supported to be fixed (ocasionally). If parent has container query inline-size, child is no longer fixed to ...
Toniq's user avatar
  • 5,146
8 votes
3 answers
2k views

I'm looking for solution how to modify property in css of element with container-type: inline-size; (not in children) by @container query. Consider HTML <div class="card card--1"> &...
Everettss's user avatar
  • 16.2k
4 votes
1 answer
4k views

https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Container_Queries Container queries for CSS are quite recent. Is MUI 5.0 already capable of using them? Unfortunately, the SxProps do not have them....
maxfromgermany's user avatar
2 votes
0 answers
37 views

I am building a website that have different pages which will have wrappers with different width. I would like to set breaking points for inner divs based on the wrappers and not the screen size. Is ...
Naomi's user avatar
  • 1,298