[css3] Proposal: spacing attribute.

It would be nice if CSS3 will have 'spacing' attribute.

Formal definition:

Name:   spacing
Value:  <length>
Initial: 0
Applies to: display-model: block-inside and display-model: table elements.
Inherited: no
Media: visual
Computed value: <length>

Tables:

The spacing attribute will allow to define 'cellspacing' html attribute in 
CSS.
(Currently table:cellspacing cannot be defined/modeled in CSS at all as you 
know).
For example default style for the table in UA can be declared as:
table { padding:2px; spacing:2px; }

Divs and other display-model: block-inside elements:

Here the spacing attribute serves purpose of minimal value of margins 
between
contained blocks - margins between blocks collapsed by using existing rules 
and then
actual value of the margin computed as: max( collapsed-margin-value, 
spacing )

Spacing shall allow negative values too. For example:

table { padding:-1px; spacing:-1px; }
table td { border: 1px solid black; }

visually will be rendered as a table with collapsed cell borders.

I am testing 'spacing' attribute now in my engine - so far
I cannot see any logical problems/conflicts.

Probably it makes sense to define also spacing-vertical, spacing-horizontal
values but I am not sure. So far I can see them helpful for emulation of
frameset:marginwidth and frameset:marginheight HTML attributes, but these
are the only of theirs kind (probably I missed something else?)...

Andrew Fedoniouk.
http://terrainformatica.com

Received on Thursday, 6 July 2006 04:04:24 UTC