Re: [csswg-drafts] [css-contain-3] Define a syntax for style-based container queries (#6396)

My bad explanation sorry - I am currently using them as utility classes with media queries
So `data-screen-col_12="justify-content:space-between;"` is referenced in my stylesheet like so where `$more-than-12-col` is a Sass variable for a breakpoint:

`@media only screen and (min-width: 1600px) {
    .feature__menu[data-screen-col_12~="justify-content:space-between;"] {
        .feature-layout__group {
            justify-content: space-between;
        }
    }`

Would the new syntax recognise the data-attribute and its value as a style?*

`@contains (min-width: 1600px) and style([data-screen-col_12="justify-content:space-between;])` {
 justify-content: space-between;
}

*not sure if this would be the correct syntax?





-- 
GitHub Notification of comment by deanleigh
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6396#issuecomment-991308563 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 10 December 2021 21:31:31 UTC