Skip to content

[css-variables] Whitespace-trimming and custom properties. #6345

Closed
@emilio

Description

@emilio

Today, these things are invalid syntax per spec:

  • --a:;
  • width: var(--b,);
  • width: var(--c,/**/);

However these are valid:

  • --a: ;
  • width: var(--a, );

As per #774 (comment), we're supposed to trim whitespace from declaration values. I was looking at implementing this in Gecko (while I was going through CSS variables failures) and I think we should make the former examples also valid, if we want to keep the resolution in #774.

We should also consider trimming whitespace from the fallback value, too...

For reference, this contains the test changes: https://phabricator.services.mozilla.com/D116459

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