Multiple borders (was the frameborder attribute)

Tapio Markula wrote:
> Frames has the 'frameborder' attribute. In CSS 'border'
> doesn't conform with it.

This isn't worrying me.

> Opera interprets borders of certain form control elemenst as
> if frame borders.

This is an Opera problem (or feature, if one chooses a 
quirky perspective).  Opera does not produce an 
overwhelming majority of Web user agents in use, so 
Opera's behavior is not, in itself, an argument for adoption 
by others.

> I propose to add 'frameborder' property, which could emulate the
> frameborder attribute.

If we are to follow the path of multiple borders (and that is a 
*big* if), we should do so with full generality and power.  I 
am lukewarm to the addition of multiple-border capability to CSS.  
I think that multiple borders are neat, but I do not have 
a compelling use case.

If CSS is to feature multiple borders, I make the following proposal.

We leave the shorthand border properties with their current 
syntax and semantics.  That is, the shorthand border properties 
set one border per side.  The longhand border values extend 
in syntax to accept multiple space-separated terms.  The first 
term applies to the innermost border and so forth.

'border-top-color', 'border-right-color', 
'border-bottom-color', 'border-left-color'
Value: [ <color> | transparent ]+

'border-top-style', 'border-right-style', 
'border-bottom-style', 'border-left-style'
Value: <visible-border-style>+ | none | hidden

'border-top-width', 'border-right-width', 
'border-bottom-width', 'border-left-width'
Value: <length>+

The 'border-...-style' properties define the number and styles 
of borders for each side.  If the 'border-...-color' or 
'border-...-width' properties have more terms than the 
respective 'border-...-style' properties, the terms are 
applied starting from the first term, and the excess ending 
terms have no effect.  If the 'border-...-color' or 
'border-...-width' properties have fewer terms than the 
respective 'border-...-style' properties, the effect is as if the 
last term in the overly brief value were repeated as necessary.  
For example, the following declaration blocks are equivalent 
in effect.

{ border-top-style: solid dashed solid;
  border-top-width: 0.5em 1em;
  border-top-color: red green blue yellow; }

{ border-top-style: solid dashed solid;
  border-top-width: 0.5em 1em 1em;
  border-top-color: red green blue; }

Etan Wexler

Received on Monday, 10 December 2001 12:50:59 UTC