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.

Doesn’t work with Cascade Layers

See original GitHub issue

When using a container query within a cascade layer the polyfill no longer works.

This works:

body {
  container-type: inline-size;
}

@container (inline-size > 100px) {
  p {
    background: yellow;
  }
}

This doesn’t:

@layer layer1;

@layer layer1 {
  body {
    container-type: inline-size;
  }
	
  @container (inline-size > 100px) {
    p {
      background: yellow;
     }
  }
}

Tested in Firefox. Full demo here.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
devknollcommented, Aug 24, 2022

I’ve cut the 0.2.3 release now with the detailed changes, which appears to resolve the issue. Let me know if you run into any further issues!

0reactions
mbarker84commented, Aug 24, 2022

Works great, thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Control CSS cascade with cascade layers - LogRocket Blog
The cascade's primary job is to assess an unordered list of CSS declarations for a given property in which the selector matches a...
Read more >
A Complete Guide to CSS Cascade Layers
This is your complete guide to CSS cascade layers, a CSS feature that allows us to define explicit contained layers of specificity, ...
Read more >
Getting Started With CSS Cascade Layers - Smashing Magazine
Cascade layers aim to place control of specificity and order back in the hands of authors. Use of @layer grants explicit power to...
Read more >
Layering Up with CSS Cascade Layers - DEV Community ‍ ‍
Cascade Layers work in the same way, but instead of elements on a page that we're moving up and down in the layer...
Read more >
CSS Cascade Layers (@layer) support · Issue #105 - GitHub
I'm working on a polyfill using the is() selector: is there a contribution guide for this project? I couldn't find it. ❤️ 3...
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