HighDots Forums  

relative dimension values.

HTML Writing HTML for the Web (comp.infosystems.www.authoring.html)


Discuss relative dimension values. in the HTML forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Andrew Fedoniouk
 
Posts: n/a

Default relative dimension values. - 05-04-2004 , 01:31 AM






As stated in CSS 2,
Box model/Width:
"The percentage is calculated with respect to the width of the generated
box's containing block."

This makes percentable values completely useless.

If we will change this definition to:
"The percentage is calculated with respect to the width of the generated
box's containing block *minus widths of all fixed elements in the line*".

Illustration:
Lets say we have three blocks placed inline with widths 25%, 100px and 75%:
Quote:
---25%--->|<---fixed:100px--->|<----------75%--------->|
Actual first and third block widths will be calculated from
ContainerContentWidth-100px weighted by their percentable values.

Using proposed alghorithm it is possible to mix fixed and "spring" content
without any tables.
Same approach should apply to heights.

Another illustration:
<P>Here is first input element <INPUT width=100px> and <SPAN
class=bigfont>here</SPAN> is another: <INPUT width=100%></P>
If we will use new schema then last input element will occupy the rest of
the line.
Layout like this cannot be implemented even with <table> because of base
line issues.

I've implemented this alghorithm in my experimental rendering engine.
Implementation is pretty simple and do not increase comlexity of layout
alghorithms significantly.
If anybody want to take a look just drop me message.

Andrew Fedoniouk.
http://TerraInformatica.com

PS: Does anybody know where is the best place to publish proposals like
this?







Reply With Quote
  #2  
Old   
David Dorward
 
Posts: n/a

Default Re: relative dimension values. - 05-04-2004 , 01:42 AM






Andrew Fedoniouk wrote:

Quote:
As stated in CSS 2,
Did you miss comp.infosystems.www.authoring.stylesheets?

Quote:
Box model/Width:
"The percentage is calculated with respect to the width of the generated
box's containing block."

This makes percentable values completely useless.
In your opinion. I find them quite useful.

Quote:
If we will change this definition to:
"The percentage is calculated with respect to the width of the generated
box's containing block *minus widths of all fixed elements in the line*".
Yeah! Break backwards compatibility! Woo!

Quote:
Illustration:
Lets say we have three blocks placed inline
If they are blocks, then they are almost certainly not inline. (Unless you
are using the supported-only-by-Opera display: inline-block.

Quote:
with widths 25%, 100px and 75%:
|<---25%--->|<---fixed:100px--->|<----------75%--------->|
What about floats?

If that first element is floated, is it supposed to be part of that "line"?
How is the UA supposed to tell?

Quote:
Using proposed alghorithm it is possible to mix fixed and "spring" content
without any tables.
Gosh, and here I was thinking that you could do that with display: table-*
all this time.

Quote:
PS: Does anybody know where is the best place to publish proposals like
this?
http://lists.w3.org/Archives/Public/www-style/

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>


Reply With Quote
  #3  
Old   
Andrew Fedoniouk
 
Posts: n/a

Default Re: relative dimension values. - 05-04-2004 , 11:25 AM



Quote:
If we will change this definition to:
"The percentage is calculated with respect to the width of the generated
box's containing block *minus widths of all fixed elements in the
line*".

Yeah! Break backwards compatibility! Woo!
It is enough to introduce %% size unit for that and let % stay as is.

Quote:
If they are blocks, then they are almost certainly not inline. (Unless you
are using the supported-only-by-Opera display: inline-block.
inline-blocks are already in W3C recomendations.
Browsers which are not implementiong this cannot be treated
as conformant browsers. Right?

Quote:
with widths 25%, 100px and 75%:
|<---25%--->|<---fixed:100px--->|<----------75%--------->|

What about floats?

If that first element is floated, is it supposed to be part of that
"line"?
How is the UA supposed to tell?
I cannot see any problems with floats here.
See the behavior of text line with text-align: justify in this case.
You may think that each whitespace in the line is given percentable width
value.

Quote:
Gosh, and here I was thinking that you could do that with display: table-*
all this time.

Yep, very clever - to regret <TABLE> as a layout instrument and to invent
table-* styles.

Thanks a lot,

Andrew Fedoniouk.
http://terrainformatica.com




Reply With Quote
  #4  
Old   
David Dorward
 
Posts: n/a

Default Re: relative dimension values. - 05-04-2004 , 12:19 PM



Andrew Fedoniouk wrote:

Quote:
Yep, very clever - to regret <TABLE> as a layout instrument and to invent
table-* styles.
That would be because <table> says something about the data, while table-*
styles simply describe how it should be laid out.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>


Reply With Quote
  #5  
Old   
Harlan Messinger
 
Posts: n/a

Default Re: relative dimension values. - 05-04-2004 , 01:17 PM




"Andrew Fedoniouk" <news (AT) terrainformatica (DOT) com> wrote

Quote:
Yep, very clever - to regret <TABLE> as a layout instrument and to invent
table-* styles.
For the same reason that it's better to use CSS properties instead of FONT
tags, ALIGN attributes, BGCOLOR attributes; instead of using BLOCKQUOTE to
indent paragraphs that aren't quotes; and so on. The only reason not to
right now is lack of support.



Reply With Quote
  #6  
Old   
Andrew Fedoniouk
 
Posts: n/a

Default Re: relative dimension values. - 05-04-2004 , 08:54 PM




"David Dorward" <dorward (AT) yahoo (DOT) com> wrote:
Quote:
That would be because <table> says something about the data, while table-*
styles simply describe how it should be laid out.
Did you try to use them practically? I suspect no.
table-* styles do not help in most cases: no colspan/rowspan, no
percentable/weighted width/height (similar to old <table> model).

Andrew Fedoniouk.
http://terrainformatica.com






Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.