W3C home > Mailing lists > Public > www-style@w3.org > July 2006

[css3] Proposal: spacing attribute.

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Wed, 05 Jul 2006 20:58:51 -0700
To: www-style@w3.org
Message-id: <000b01c6a0b0$7e1e21b0$3401a8c0@TERRA>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:45 GMT