this post was submitted on 29 Sep 2025
22 points (100.0% liked)

Web Development

4745 readers
16 users here now

Welcome to the web development community! This is a place to post, discuss, get help about, etc. anything related to web development

What is web development?

Web development is the process of creating websites or web applications

Rules/Guidelines

Related Communities

Wormhole

Some webdev blogsNot sure what to post in here? Want some web development related things to read?

Heres a couple blogs that have web development related content

CreditsIcon base by Delapouite under CC BY 3.0 with modifications to add a gradient

founded 2 years ago
MODERATORS
 

Do you guys already use css @layer in your code? just curious.
Do you deem a level of adoption sufficient?

https://caniuse.com/mdn-css_at-rules_layer

you are viewing a single comment's thread
view the rest of the comments
[–] bytepursuits@programming.dev 2 points 1 month ago* (last edited 1 month ago)

I think it really helps if you dont like !important:

@layer base, toggles;
@layer toggles {
    .wprm-print-hide-recipe-nutrition .wprm-recipe-nutrition-label-section {
        display: none;
    }
}

instead of

.wprm-print-hide-recipe-nutrition .wprm-recipe-nutrition-label-section {
    display: none !important;
}

I guess I answered my own question - I think its a neat feature and ill use it.