Skip to content

[css-backgrounds-4] default background-origin for border-area in shorthand #11167

@fantasai

Description

@fantasai

In #10907 (comment) @jsnkuhn wrote:

FYI, the other property reset i've used every time with border-area is background-origin: border-box;. Considering resetting border-box as an initial background-origin value might be of use as well since im my experience most devs are not familiar with that property.

https://codepen.io/jsnkuhn/pen/eYwoGgr?editors=1100
https://codepen.io/jsnkuhn/pen/LYKXGPo
https://codepen.io/jsnkuhn/pen/WNqaeOV
https://codepen.io/jsnkuhn/pen/OJeoapM

There's two relevant questions

  • should background-origin check background-clip to compute a smart default value
  • in the background shorthand, when one box keyword is specified it's applied to both background-clip and background-origin (spec); but border-area is not a valid keyword for background-origin, so should we default it to border-area.

I think we should definitely fix the latter. Unsure about the former, though it would certainly be helpful to authors.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Regular agenda items

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions