question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Container query stops working when changing DOM

See original GitHub issue

It seems that under some specific circumstances, changes in DOM either aren’t detected or for some other reason, the generated class is not reattached to @container-affected elements.

It seems that two container queries are needed to reproduce the issue.

Minimal example: https://jsfiddle.net/edt3b1Lz/ After clicking on Render A, .a’s container query stops working until the container is resized.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:7

github_iconTop GitHub Comments

5reactions
PriitPaluojacommented, Feb 3, 2022

Are there any updates on this?

0reactions
devknollcommented, Aug 16, 2022

This issue should be fixed by the newest version of the polyfill (currently in alpha). Please give it a try and let me know if you run into any further issues.

Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Responsive Components: a Solution to the Container Queries ...
I've found the best way to handle this is to inline your container query code at the end of your HTML templates, so...
Read more >
Container queries begin to land in stable browsers while the ...
"Container queries enable components to own their responsive styling information based on the space they fit within.
Read more >
A Primer On CSS Container Queries - Smashing Magazine
Let's look at what problem is being solved, learn how container queries work, and see how they compare with and complement existing CSS ......
Read more >
Container Query Discussion | CSS-Tricks
The final reason I question the need for container queries is that a change in layout sometimes requires a change in behavior, too....
Read more >
Web Components support? · Issue #7 - GitHub
attachShadow() seems to work well, however, the biggest hurdle I am running into is that the CSS_Object_Model does not have the CSSContainerRule yet....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found