W3C home > Mailing lists > Public > www-style@w3.org > December 2011

getComputedStyle and border property.

From: Alexis Menard <alexis.menard@openbossa.org>
Date: Thu, 29 Dec 2011 15:12:09 -0300
Message-ID: <CACh0f5jvzwe+AKNN1T6ctcnNmwz5cgiuq0aN5Kw1uDhJsj-4wQ@mail.gmail.com>
To: www-style@w3.org
Hi,

I was looking on implementing in WebKit the support of the border
shorthand property that you can query from the computed style. I have
a doubt on the implementation itself.

Given this declaration :

border: 20em solid red;

what we should return ?

320px solid rgb(255, 0, 0), 320px solid rgb(255, 0, 0), 320px solid
rgb(255, 0, 0), 320px solid rgb(255, 0, 0)

or

320px solid rgb(255, 0, 0)

For the first case the CSS parser of WebKit doesn't parse it. Should
we make it work or option 2 is better?

Now consider this declaration :

border: 20em solid red; border-top: 10px groove blue;

what we should return?

10px groove rgb(0, 0, 255), 320px solid rgb(255, 0, 0), 320px solid
rgb(255, 0, 0), 320px solid rgb(255, 0, 0)

or nothing?

Opera seems to return nothing in that case.

Thanks for the input.

-- 
Alexis Menard (darktears)
Software Engineer
INdT Recife Brazil
Received on Friday, 30 December 2011 06:53:19 GMT

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