bytepursuits@programming.dev to Web Development@programming.devEnglish · 19 days agoDo you already use @layer in your code?developer.mozilla.orgexternal-linkmessage-square4linkfedilinkarrow-up122arrow-down10file-text
arrow-up122arrow-down1external-linkDo you already use @layer in your code?developer.mozilla.orgbytepursuits@programming.dev to Web Development@programming.devEnglish · 19 days agomessage-square4linkfedilinkfile-text
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
minus-squarebytepursuits@programming.devOPlinkfedilinkarrow-up2·edit-27 days agoI 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.
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.