8000 [css-values] unify CSS wide keywords and defaulting keywords · Issue #7170 · w3c/csswg-drafts · GitHub
[go: up one dir, main page]

Skip to content

[css-values] unify CSS wide keywords and defaulting keywords #7170

@yisibl

Description

@yisibl

These keyword definitions are currently scattered throughout the specification, making it easy for other CSS parsers or engine implementers to miss them. e.g.

var wideKeywords = map[string]bool{
	"initial": true,
	"inherit": true,
	"unset":   true,
}
match &*value.to_ascii_lowercase() {
    "initial" | "inherit" | "unset" | "revert" | "default" => {
        return Err(Error::new(span, ErrorKind::InvalidCustomIdent(raw)));
    }
    _ => {}
}
const globalKeywords = ['inherit', 'initial', 'unset'];

css-values-4

https://www.w3.org/TR/css-values-4/#common-keywords

Defined:

  • initial
  • inherit
  • unset

css-cascade-4

https://drafts.csswg.org/css-cascade/#defaulting-keywords

Defined:

  • initial
  • inherit
  • unset
  • revert

css-cascade-5

https://drafts.csswg.org/css-cascade-5/#revert-layer

Defined:

  • initial
  • inherit
  • unset
  • revert
  • revert-layer

css-values-4

https://www.w3.org/TR/css-values-4/#ref-for-css-wide-keywords

The CSS-wide keywords are not valid <custom-ident>s. The default keyword is reserved and is also not a valid <custom-ident>

There is a default keyword.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0