Skip to content

[css-backgrounds-3] Disallow double // in border-image #7672

@cdoublev

Description

@cdoublev

0 // 1 is valid according to the border-image grammar, but I am not sure the original intent was to allow //. The grammar has been modified (10 years ago) to prevent a trailing /. I think the following value definition would prevent //:

     <'border-image-source'>
- || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]?
+ || <'border-image-slice'> [ / <'border-image-width'> | [ / <'border-image-width'> ]? / <'border-image-outset'> ]?
  || <'border-image-repeat'>

There is no WPTs for a similar input. There is an existing WPT and I cannot say if this change would represent a back-compat issue.

Similarly, I am noting that you cannot set <bg-size> without defining <bg-position>: <bg-position> [ / <bg-size> ]?. Alternatively, it could be simplified in a consistent way with:

     <'border-image-source'>
- || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]?
+ || <'border-image-slice'> [ / <'border-image-width'> [ / <'border-image-outset'> ]? ]?
  || <'border-image-repeat'>

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