W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2012

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

From: Kishore Bolisetty <ganesh.bksv@gmail.com>
Date: Fri, 8 Jun 2012 11:15:34 +0530
Message-ID: <CAAjuXiqyqhJ5GqppkgQoXz4-N5+ayytnvxJ5B19i0uo5=nNejQ@mail.gmail.com>
To: Ian Hickson <ian@hixie.ch>
Cc: whatwg@lists.whatwg.org, "Tab Atkins Jr." <jackalmage@gmail.com>
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@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.   `._.-(,_..'--(,_..'`-.;.'
>
Received on Friday, 8 June 2012 05:46:04 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:43 UTC