![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
THE PROBLEM The % symbol is too vague when defining dimensions in CSS and HTML. It can relate to an inherited value, a measure of the containing element (which can differ between box models) or for background image placement, the size of the element minus the size of the image. A SOLUTION There should be new %-like units defined in CSS to specify what the measurement is a percentage of. These take the form of the % sign and one or more letters: |
|
Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ | (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ | ----------------------------------------------------------------------------- |
#3
| |||
| |||
|
|
The % symbol is too vague when defining dimensions in CSS and HTML. It can relate to an inherited value, a measure of the containing element (which can differ between box models) or for background image placement, the size of the element minus the size of the image. |
|
Clearly, the vagueries of % need to be fixed. In my opinion, this is a good way to do that, and a logical extension of existing CSS syntax. |
#4
| ||||
| ||||
|
|
For fonts it's a % of the default value. In RGB color units it's a % of the 8 bits in the red, green and blue channel. There are others. |
|
You can take the rule that a % is a % of either the default value or the parent element's value. I wouldn't consider this vague. If you were to read the spec you'll find everything defined. http://www.w3.org/Style/CSS/ |
|
On the other hand, it might be useful to be able to define the total width/height of an element (including content, padding, border and margin) as a % value. |
|
Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ | (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ | ----------------------------------------------------------------------------- |
#5
| |||
| |||
|
|
| For fonts it's a % of the default value. In RGB color units it's a % | of the 8 bits in the red, green and blue channel. There are others. With or without gamma correction? What would you expect to get from 50% of #ffffff ? #808080 ? #c0c0c0 ? |
|
| On the other hand, it might be useful to be able to define the total | width/height of an element (including content, padding, border and | margin) as a % value. What does 10.3.3 say? |
#6
| ||||
| ||||
|
|
On Mon, 15 May 2006 13:14:28 +0800 ironcorona <iron.corona (AT) gmail (DOT) com> wrote: | For fonts it's a % of the default value. In RGB color units it's a % | of the 8 bits in the red, green and blue channel. There are others. With or without gamma correction? |
|
What would you expect to get from 50% of #ffffff ? #808080 ? #c0c0c0 ? |
|
| You can take the rule that a % is a % of either the default value or the | parent element's value. | | I wouldn't consider this vague. If you were to read the spec you'll | find everything defined. | | http://www.w3.org/Style/CSS/ At the level he has specified an idea, it seems he has at least read some of the document. So no need to tell him where it is unless you are just trying to have an attitude with him. Sure, he might have read the thing very well ... feel free to point out _where_ within the document to find specific things. |
|
| On the other hand, it might be useful to be able to define the total | width/height of an element (including content, padding, border and | margin) as a % value. What does 10.3.3 say? |
#7
| |||
| |||
|
|
phil-news-nospam (AT) ipal (DOT) net wrote: | For fonts it's a % of the default value. In RGB color units it's a % | of the 8 bits in the red, green and blue channel. There are others. With or without gamma correction? What would you expect to get from 50% of #ffffff ? #808080 ? #c0c0c0 ? It is always 50% of ff. |
|
Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ | (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ | ----------------------------------------------------------------------------- |
#8
| |||
| |||
|
|
phil-news-nospam (AT) ipal (DOT) net wrote: On Mon, 15 May 2006 13:14:28 +0800 ironcorona <iron.corona (AT) gmail (DOT) com> wrote: | For fonts it's a % of the default value. In RGB color units it's a % | of the 8 bits in the red, green and blue channel. There are others. With or without gamma correction? I have no idea what gamma correction does but I think you're nitpicking. It is the same as using numerical RGB values or using the combination of three octets in the hex units. |
|
What would you expect to get from 50% of #ffffff ? #808080 ? #c0c0c0 ? Note that I said "In RGB color units it's a % of the 8 bits in the red, green and blue channel" it would look something like {color: rgb(50%,50%,50%)} which translates to {color: rgb(128, 128, 128)} OR {color:#808080;} |
|
Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ | (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ | ----------------------------------------------------------------------------- |
#9
| |||
| |||
|
|
|> With or without gamma correction? | |> What would you expect to get from 50% of #ffffff ? |> #808080 ? #c0c0c0 ? | | It is always 50% of ff. You're evading the question. |
#10
| |||
| |||
|
|
On Mon, 15 May 2006 15:05:02 +0800 ironcorona <iron.corona (AT) gmail (DOT) com> wrote: | phil-news-nospam (AT) ipal (DOT) net wrote: |> On Mon, 15 May 2006 13:14:28 +0800 ironcorona <iron.corona (AT) gmail (DOT) com> wrote: | |> | For fonts it's a % of the default value. In RGB color units it's a % |> | of the 8 bits in the red, green and blue channel. There are others. | |> With or without gamma correction? | | I have no idea what gamma correction does but I think you're nitpicking. | It is the same as using numerical RGB values or using the combination | of three octets in the hex units. I think you better learn what gamma correction does. Maybe the standards people need to learn, too. Most of the graphics people, especially those working with correct color values and working with video, know it. |
|
|> What would you expect to get from 50% of #ffffff ? |> #808080 ? #c0c0c0 ? | | Note that I said "In RGB color units it's a % of the 8 bits in the red, | green and blue channel" | | it would look something like {color: rgb(50%,50%,50%)} which translates | to {color: rgb(128, 128, 128)} OR {color:#808080;} The natural expectation of "50%" would be "half bright". However, #808080 does not give you that. The value that will is somewhere around #c0c0c0 depending on your video monitor. |
![]() |
| Thread Tools | |
| Display Modes | |
| |