W3C home > Mailing lists > Public > www-style@w3.org > November 2010

[CSS21] What is the computed value for "border"?

From: Daniel Schattenkirchner <schattenkirchner.daniel@gmx.de>
Date: Wed, 03 Nov 2010 20:15:00 +0100
Message-ID: <4CD1B4B4.2000800@gmx.de>
To: www-style@w3.org
Working with DOM Level 2 Style I came across this question/issue.

The computed value of the border property doesn't seem to be defined.

"Computed Value" of the border shorthand in 8.5.4 Border shorthand 
properties [1] states: "see individual properties".

However, the border property can't define the whole border of an 
element. For example, given these styles:

   border-top: 2px solid green;
   border-left: 3px dashed blue;
   border-right: 4px dotted red;
   border-bottom: 5px outset black;

What is the computed style for border?

Browser tools return individual border properties on examination and 
getComputedStyle.getPropertyValue doesn't return a result in any browser 
(only Opera appears to actually support this DOM method on unambigious 
CSS shorthand properties).

[1] defines the border porperty's value composition to be

> [ <border-width> || <border-style> || <'border-top-color'> ] | inherit

At first I though this means that the browser should expose the 
definition for border-top. But this seems to be an editorial issue, 
"border-top-color" is simply the ID for 8.5.2 Border color and is used 
later again when defining the border side shorthands.

So, what is the computed value for "border"?

Kind regards, Daniel

[1] http://www.w3.org/TR/CSS2/box.html#propdef-border
Received on Wednesday, 3 November 2010 19:15:34 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:34 GMT