-
Notifications
You must be signed in to change notification settings - Fork 84
Media features are extracted as descriptors instead of value #479
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
Comments
The specs actually call them descriptors. Where would you expect to find them?
We're both aware that CSS extraction is imperfect and unaware of all the places where there are issues, thanks for the report! In most cases, this is due to specs not containing enough clues for definitions to be picked up by Reffy, although code that extracts CSS definitions (in It would be good to add additional tests to enforce additional guarantees such as "No valuespace that just hangs out there without being used" so as to catch these issues automatically and be able to curate the data (see #127). That would trigger some work on patches to specs and/or to webref data... Help welcome ;) |
It is weird. In Syntax, 5. Parsing:
CSS descriptors is anchored to its definition in 9.2 At-rules:
EDIT: oh maybe associated with a particular type of at-rule rather than with elements and boxes in the tree means that a descriptor can be used anywhere (prelude or value) in an at-rule? The above suggests that descriptors should be contained by the at-rule: it can not be qualified as a descriptor if it is in its prelude. What do you think? Below is an exemple that is syntactically invalid but it illustrates the above definitions: @at-rule (media-feature: value) {
descriptor: value;
property: value;
}
Ideally, I want to get a list of the descriptors allowed in a specific at-rules in order to discard a declaration whose name is not in the list of the properties/descriptors allowed in this specific at-rule, therefore it is not really an issue for me because I will use the Because To avoid generating a useless list of "descriptors" (media features) that would be allowed in Therefore I would say that I do not expect to find them, but they can exist in
Thank you! I'm often tempted to look deeper into I was planning to let you know about this when it is finished, because it is already taking too much of my time. But I definitely want to help on |
I think you lost me. I'm not sure how to apply "prelude" and "value" to at-rules, but for me descriptors are tokens that you can only find between parentheses next to an
I can only relate to the "taking too much of my time" part ;) |
|
Trying to reformulate the issue, the problem is that CSS specs use the term "descriptor" to mean
... and you would like to have a way to separate both usages. Did I get it right this time? I may miss something, but I don't see any way to do that with the data available, especially since production rules for the at-rules are typically defined in prose and thus not in a machine-readable format that could end up in CSS extracts to tell you where descriptors may appear.
That probably shows that the terminology is confusing for everyone ;) The table uses the |
Yes, because I have to parse rule's contents to check they only contains valid descriptors: I don't really care about the descriptors are used in their prelude (ie. next to an at-rule). Ok, then I'm closing this issue. I do not want to bother Thank you! |
FWIW, there is already a filed bug about the misusage of "property" in the CSS page spec which acknowledges this is a mistake in the spec |
Media features are extracted as descriptors. Do you want me to report the issue on
w3c/csswg-drafts
or do you think it can be fixed here?I take this opportunity to ask an off topic question. Syntaxes of child at-rules are extracted by
@webref/css
, but not the top-level at-rules. Are you aware of this? Is it also because of a markup issue? Eg. for@keyframes
:This is not extracted.
This is extracted.
The text was updated successfully, but these errors were encountered: