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

Invalid initial value of some CSS descriptors #707

Open
cdoublev opened this issue Aug 20, 2022 · 2 comments
Open

Invalid initial value of some CSS descriptors #707

cdoublev opened this issue Aug 20, 2022 · 2 comments

Comments

@cdoublev
Copy link

cdoublev commented Aug 20, 2022

Some descriptors are defined with an initial field value that is not a valid CSS value. If I am not mistaken, for each of them, the value should be internally resolved to undefined and should serialize to an empty string, eg. with CSSFontFaceRule.style.getPropertyValue(src) (yes, it is weird but already supported in Chrome at least).

Obviously, these initial values cannot be used, but I am not sure if you want to fix it on your side. I remove them, which is equivalent to defining them to undefined. But it may also be usefull to have a prose defining that the initial value is an undefined/invalid value instead of having an empty string. I am creating this issue to let you know about this, but feel free to close it.

  • @color-profile
    • components: n/a
    • src: n/a
  • @counter-style
    • additive-symbols: n/a
    • symbols: n/a
  • @font-face
    • font-family: N/A
    • src: N/A
  • @font-palette-values
    • base-palette: N/A
    • font-family: N/A
    • override-colors: N/A
  • @property
    • inherits: n/a (see prose)
    • initial-value: the guaranteed-invalid value (but see prose)
    • syntax: the guaranteed-invalid value (but see prose)
@tidoust
Copy link
Member

tidoust commented Aug 22, 2022

Thanks for the list! We currently extract but don't check the initial value at all. It would seem a good idea to drop initial when value is n/a. There are similar problems in the list of properties, e.g. those where initial is set to "See individual properties".

@cdoublev
Copy link
Author

There are similar problems in the list of properties, e.g. those where initial is set to "See individual properties".

These are all shorthands, I think. I also remove them. I know that sometimes, a shorthand is defined with a valid CSS value, though, which is weird (or even incorrect) because a shorthand have no declaration internally stored: the value of a shorthand is resolved from the declarations values for its longhands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants