W3C home > Mailing lists > Public > public-css-archive@w3.org > October 2016

[csswg-drafts] [css-backgrounds] Clarify how `border-width` and `border-style` affect `border-image`

From: SelenIT via GitHub <sysbot+gh@w3.org>
Date: Thu, 27 Oct 2016 06:31:17 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-185583959-1477549875-sysbot+gh@w3.org>
SelenIT has just created a new issue for 
https://github.com/w3c/csswg-drafts:

== [css-backgrounds] Clarify how `border-width` and `border-style` 
affect `border-image` ==
There is a confusion about how `border-width` and `border-style` 
should affect `border-image` (and should they). In the 
[example](http://codepen.io/SelenIT/details/yaAKPZ/) of border-image 
with nonzero `border-image-width` combined with either 
`border-width:0` or `border-style:none`, browsers behave differently. 
Firefox and IE11 renders border-image in all these situation, 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](http://caniuse.com/#feat=border-image) 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](https://test.csswg.org/harness/test/css-backgrounds-3_dev/spec/css-backgrounds-3/section/6.3/alpha/border-image-width-005/),
 
[border-image-width-006](https://test.csswg.org/harness/test/css-backgrounds-3_dev/spec/css-backgrounds-3/section/6.3/alpha/border-image-width-006/),
 and 
[border-image-width-007](https://test.csswg.org/harness/test/css-backgrounds-3_dev/spec/css-backgrounds-3/section/6.3/alpha/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](https://drafts.csswg.org/css-backgrounds-3/#the-border-width)
 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?

Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/655 using your GitHub 
account
Received on Thursday, 27 October 2016 06:31:23 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:04 UTC