Skip to content

[css-syntax-3]: Voluntary semicolons #5413

@timreichen

Description

@timreichen

Allow semicolon to be voluntary after a Declaration when followed by newline or block closing.

let

div {
  background: red
  color: green
}

behave the same as

div {
  background: red;
  color: green;
}

link to the spec section:
https://www.w3.org/TR/css-syntax-3/#typedef-semicolon-token

Related links
https://teamtreehouse.com/community/does-the-semicolon-have-to-be-added-after-each-declaration-in-a-rule-or-is-it-optional (2017)

I can imagine that I am not the first one to raise an issue/proposal on that feature. But I could not find any. Links to issues and sources are welcome.

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