W3C home > Mailing lists > Public > www-style@w3.org > January 2012

Re: % is not a valid unit for border-width

From: Gérard Talbot <www-style@gtalbot.org>
Date: Thu, 5 Jan 2012 15:39:30 -0800
Message-ID: <7ea5ed4661d4ee60b40a9c697a01c708.squirrel@gtalbot.org>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: "W3C www-style mailing list" <www-style@w3.org>

Le Jeu 5 janvier 2012 13:56, Tab Atkins Jr. a écrit :
> 2012/1/5 "Gérard Talbot" <www-style@gtalbot.org>:
>> Le Jeu 5 janvier 2012 12:24, Tab Atkins Jr. a écrit :
>>
>>>  A reasonable constructed
>>> example with an explanation of how percentage border widths would help
>>> will suffice.
>>>
>>> ~TJ
>>
>>
>> CSS Border Design Challenge
>> http://ago.tanfa.co.uk/css/borders/
>>
>> With a percentage unit for border, I believe there would have been more
>> creative possibilities.
>
> Most of those are absolutely silly and not something we should
> actually care about,

Tab,

Personally, I have not taken position for or against percentage unit for
border-width. If percentage unit for border-width becomes or does not
become a reality in a CSS3 module, it would make no difference to me. I
really do not care one way or another on this issue.


> but the keyboard design is at least *slightly*
> plausible and would benefit from percentage borders.  Still, though,
> I'd like to see an actual page using a scalable design that would
> benefit from it.

Your question is excellent because it relates to relevance, usefulness, etc..

Here's a real possibility where it would or could have made some  difference.


http://www.gtalbot.org/BrowserBugsSection/Safari3Bugs/LiquidScrollerTabMenu.html

If percentage unit for border-width would be real, implemented, then at
line 98 of that page I would have coded something like this:

  #wrapper
  {
  background-color: #DDD;
  border: black solid 0.5%;
  color: #333;
  height: 99%;
  min-height: 440px;
  overflow: hidden;
  }

In the code, I say and approximate 4px to be 1%:

  #wrapper
  {
  background-color: #DDD;
  border: 2px solid;
  color: #333;
  height: 99%; /* 99% since we use a total of 4px for top and bottom
borders */
  min-height: 440px;
  overflow: hidden;
  }


When you're trying to do a scalable, as most scalable, fluid as possible,
then, understandably you want to use em unit everywhere possible or % unit
on every possible elements and properties which imply a dimension, a
length.

(Disclaimer: a few weeks ago, I modified that webpage and probably forgot
to undo my changes; now, the page footer is off the screen... but before,
everything was inside the viewport.)

regards, Gérard
-- 
CSS 2.1 Test suite RC6, March 23rd 2011
http://test.csswg.org/suites/css2.1/20110323/html4/toc.html

Contributions to CSS 2.1 test suite
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/

Web authors' contributions to CSS 2.1 test suite
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/web-authors-contributions-css21-testsuite.html
Received on Thursday, 5 January 2012 23:40:00 GMT

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