[css-backgrounds] Re: CSS Backgrounds and Borders Module Level 3 and border-style

Le 2018-01-12 11:45, Dennis Heuer a écrit :
> Hello again!
> 
> I personally think that this module should be checked for unneccessary
> incompatibilities

There is no inherent incompatibility when 'border-style' is 'none' while 
'border-width' uses a keyword like 'medium' or a positive integer value. 
Both properties set distinct, separate features. Just like a 
'border-style' can be set to 'solid' while 'border-width' can be set to 
'0'.

> Found below border-width:
> 
> "Note that the initial width is medium, but the initial style is none
> and therefore the used width is 0."

Dennis,

If you look at CSS1, CSS2.0, CSS2.1, CSS2.2,

https://www.w3.org/TR/REC-CSS1/#border-style

https://www.w3.org/TR/2008/REC-CSS2-20080411/box.html#border-style-properties

https://www.w3.org/TR/CSS21/box.html#border-style-properties

https://www.w3.org/TR/CSS22/box.html#border-style-properties

the initial value for 'border-style' has been 'none' while the initial 
value for 'border-width' has been 'medium'. And they all mentioned that 
"Since the initial value of the border styles is 'none', no borders will 
be visible unless the border style is set"  and CSS2.x mentioned that 
computed (and used) border width is 0 when 'border-style' is 'none'. It 
has been like that since 1996.

> Why style = none and not, like in other cases, style = solid?

Which other cases?

If you look at initial value of properties in this page

https://www.w3.org/TR/CSS22/propidx.html

you'll see that initial value of properties all are '0' or 'none' or 
'auto' or 'normal' or 'transparent'. In other words, they all use a 
neutral value or a null value or an ineffective (as in non-rendering) 
value or they use and rely on the user's set values as set in his user 
agent preferences.

The initial value of 'border-width' could have been set to '0' too 
instead of 'medium' while the initial value of 'border-style' could have 
been set to 'solid'. The initial value of 'border-color' could have been 
set to 'transparent' too.

Gérard

Received on Friday, 12 January 2018 22:28:38 UTC