Skip to content

[css-content] Fix syntaxes according to CSS Values and Units grammar #663

@lahmatiy

Description

@lahmatiy

Comments for https://drafts.csswg.org/css-content/

<content-list>

  • leader() should be surrounded by angle brackets instead of quotes
  [ <string> | contents | <image> | <quote> | <target> | 'leader()' ]+
->
  [ <string> | contents | <image> | <quote> | <target> | <leader()> ]+

leader( <leader-type> )

  • Incorrect definition:
    • functions are declaring as <function()>
    • arguments are usually omitting -> <leader-type> should be omitted or declared aside
  • A space before closing parenthesis is missing
  • No semicolon at the end
  <leader-type> = leader( dotted | solid | space | <string>);
->
  <leader()> = leader( dotted | solid | space | <string> )
or
  <leader()> = leader( <leader-type> )
  <leader-type> = dotted | solid | space | <string> 

<target>

  • All functions should be surrounded by angle brackets
  • Square brackets aren't needed
  <target> = [ target-counter() | target-counters() | target-text() ]
->
  <target> = <target-counter()> | <target-counters()> | <target-text()>

<target-counter()>

  target-counter() = target-counter( [ <string> | <url> ] , <custom-ident> [ , <counter-style> ]? )
->
  <target-counter()> = target-counter( [ <string> | <url> ] , <custom-ident> , <counter-style>? )

<target-counters()>

  target-counters() = target-counter(  [ <string> | <url> ] , <custom-ident> , <string> [ , <counter-style> ]? )
->
  <target-counters()> = target-counters(  [ <string> | <url> ] , <custom-ident> , <string> , <counter-style>? )

<target-text()>

  • Angle brackets are missing in syntax reference
  • Last group can be omitted since comma are implicitly omissible
  • A space is missing between first-letter and ]
  target-text() = target-text( [ <string> | <url> ] [ , [ content | before | after | first-letter] ]? )
->
  <target-text()> = target-text( [ <string> | <url> ] , [ content | before | after | first-letter ]? )

<string()>

  • Angle brackets in syntax reference are missing
  string() = string( <custom-ident> , [ first | start | last | first-except ]? )
->
  <string()> = string( <custom-ident> , [ first | start | last | first-except ]? )

<content()>

  • Angle brackets in syntax reference are missing
  • Wrong multiplier ? is used since argument is required
  • A space is missing between [ and text
  content() = content( [text | before | after | first-letter | marker ]? )
->
  <content()> = content( [ text | before | after | first-letter | marker ] )

05/15/2017 Updated to version of 15 May 2017

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