Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-conditional-5] @supports elements queries #7023

Open
NagayamaToshiaki opened this issue Feb 8, 2022 · 2 comments
Open

[css-conditional-5] @supports elements queries #7023

NagayamaToshiaki opened this issue Feb 8, 2022 · 2 comments
Labels
css-conditional-5 Current Work

Comments

@NagayamaToshiaki
Copy link

There have been not much changes or addition of elements recently, but inability of querying the support of HTML element is not handy.
so I would like to issue the new specs that would be written like this:

@supports element(foo) {
    foo {
        line-height: 1.5;
    }
}
@fantasai fantasai added the css-conditional-5 Current Work label Feb 8, 2022
@cdoublev
Copy link
Collaborator

cdoublev commented Feb 8, 2022

<foo style="color: red">Red</foo>

The above markup renders Red with the red color in most (all?) browsers, even when foo is not declared as an HTML custom element (web component). I think it would be hard to validate an element type in CSS, which can also apply in XML documents, for exemple.

Also, because element() allows an author to use an element in the document as an image, it would be confusing to get different behaviors (feature query and image source) in @supports and eg. background-image.

@svgeesus
Copy link
Contributor

I agree that the proposed syntax has an unfortunate clash with the element() notation.

More concerning though is that we would need a crisp definition of what it means to support an element. Simply parsing it and not throwing it away? Something more, surely, but what exactly?

@svgeesus svgeesus changed the title [css-conditional-4] @supports elements queries [css-conditional-5] @supports elements queries Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-conditional-5 Current Work
Projects
None yet
Development

No branches or pull requests

4 participants