Description
There is a confusion about how border-width
and border-style
should affect border-image
(and should they). In the example of border-image with nonzero border-image-width
combined with either border-width:0
or border-style:none
, browsers behave differently. Firefox and IE11 render border-image in all these situations, Edge 14 — only if border-style
is not none
, iOS 10 Safari — only if border-width
is not 0
, and Chrome requires both to render it.
It seems to be a popular assumption that border-style
should override border-image
(e.g. see the note 1 on the caniuse.com page for border-image
). However, the current spec clearly says that border-style
and its sub-components "set the style of the border, unless there is a border image", implying that border-style
shouldn't affect border-image
if its own sub-components values allow it to be rendered.
The test suite for this section (especially tests border-image-width-005, border-image-width-006, and border-image-width-007) marks the current behavior of Firefox (i.e. ignoring both border-style:none
and border-width:0
if there is valid border-image
with explicit non-zero border-image-width
) as correct.
But there seems to be a bit of ambiguity in the spec in relation to border-width
. The section for this property has the following remark:
When the used width of the border is 0, we say that the border is absent.
And there is no clarification if it is about just "regular" border or about image border, too. Should we add such clarification?