Skip to content

Only one CSS-wide keywords can exist in the property value #287

@yisibl

Description

@yisibl

Invalid value

Should throw an error, but it doesn't now.

.Invalid {
	animation-name: default, two;
	animation-name: one, initial;
	animation-name: one, inherit;
	animation-name: one, unset;
	animation-name: revert, three;
	animation-name: revert-layer, four;
	animation-name: "foo", unset;
	animation-name: unset, "foo";
}

Valid value

.Valid {
	animation-name: none, none;
	animation-name: one, none;
	animation-name: "foo", none;
	animation-name: none, "foo";
}

csstree output

 syntax: [ none | <keyframes-name> ]#
  animation-name: "foo",unset
  ----------------------^

Theoretically, any property that supports multiple values, except for the animation-name property, needs to be handled this way. For details, see: web-platform-tests/wpt@4f82d32

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions