Will CSS 3 still allow omitting final semicolons?

前端 未结 3 2101
春和景丽
春和景丽 2020-12-07 01:35

There seems to be a breaking (i.e. backwards-incompatible) change in the CSS Syntax Module Level 3 specification upcoming draft: trailing semicolon after the last declaratio

3条回答
  •  不思量自难忘°
    2020-12-07 01:58

    I think that it's just a mistake when writing the specifications, and that the real intention was to have it as a separator, just as in previous versions. I expect this to be adjusted in later drafts.

    The W3C validation service says that the example without the trailing semicolon is valid CSS level 3.

    I will however, as I have always done, end each declaration with a semicolon. This is a good practice, so that you don't forget the separator when you add more declarations.

提交回复
热议问题