[whatwg] <table> Relation between "bordercolor" and "border" attributes

Kishore Bolisetty ganesh.bksv at gmail.com
Thu Jun 7 22:45:34 PDT 2012


Hi All,
As you rightfully said if the border style is none there is on point in
rendering the border. That way safari is wrong. Let me revisit the spec.
Thanks for the clarification.

On Fri, Jun 8, 2012 at 5:14 AM, Ian Hickson <ian at hixie.ch> wrote:

> On Tue, 6 Mar 2012, Kishore Bolisetty wrote:
> >
> > I have been looking at spec for finding relation between html table's
> > bordercolor and border attributes.
> >
> > ------------------------------
> > When a table element has a bordercolor attribute, its value is expected
> > to be parsed using the rules for parsing a legacy color value , and if
> > that does not return an error, the user agent is expected to treat the
> > attribute as a presentational hint setting the element's
> > 'border-top-color', 'border-right-color', 'border-bottom-color', and
> > 'border-right-color' properties to the resulting color.
> >
> > The table element's border attribute maps to the pixel length properties
> > 'border-top-width', 'border-right-width', 'border-bottom-width',
> > 'border-left-width' on the element. If the attribute is present but
> > parsing the attribute's value using the rules for parsing non-negative
> > integers generates an error, a default value of 1px is expected to be
> > used for that property instead.
> > ------------------------------
> >
> > But it doesn't talks about the behaviour - what if border is not
> > specified but bordercolor is specified?
>
> You follow the rules in that section, and end up with border-color
> specified, but border-style and border-width not specified, and no border
> renders.
>
>
> > Looks like browsers have taken their own implementations on this, Opera
> > and Mozilla displays bordercolor only if border is specified, where as
> > Safari displays bordercolor assuming a default border.
>
> Safari is incorrect.
>
>
> On Tue, 6 Mar 2012, Tab Atkins Jr. wrote:
> >
> > This behavior depends on the browser's default stylesheet, and whether
> > they default borders to "border-style: solid; border-color:
> > currentColor;" or "border-style: solid; border-width: 0px;".  Browsers
> > are allowed to do either.
>
> The spec actually defines this now. It's 'border-color: gray',
> border-style and border-width at initial values (none and medium
> respectively), assuming there's no attributes making things more
> complicated.
>
> --
> Ian Hickson               U+1047E                )\._.,--....,'``.    fL
> http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
> Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
>



More information about the whatwg mailing list