This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 11474 - col and colgroup should have global attributes applied
Summary: col and colgroup should have global attributes applied
Status: RESOLVED WONTFIX
Alias: None
Product: HTML WG
Classification: Unclassified
Component: LC1 HTML5 spec (show other bugs)
Version: unspecified
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-05 10:19 UTC by Jim Michaels
Modified: 2011-08-04 05:14 UTC (History)
6 users (show)

See Also:


Attachments

Description Jim Michaels 2010-12-05 10:19:43 UTC
currently, browsers only apply background-color and maybe background-image css to col and colgroup elements.  I don't know if this is the place for this, but I think it would be proper for col and colgroup to at *least* have a class and a style attribute, and other "on..." events associated with the global attributes.  

also, MUCH more CSS (all?) needs to be applied to the col and colgroup elements, with the reasoning that whatever you can do with the tr element, you should be able to do with the col and colgroup elements.  

(so what is the difference between col and colgroup anyway if they are only going to do backgrounds?)  

I think col and colgroup could be much more powerful if they were given full access to theglobal attributes and css.  and I think there should also be new "row" and "rowgroup" elements as well to match, rows having higher priority.

If you had a red row and green col in a cross formation, I would think that the center would be red, unless the cell in the center has its own overriding color.

I suspect this is also a problem with lower versions of HTML as well, so there needs to be some browser correction across the board.

I have had problems with IE8, webkit, and firefox, so I figured something must be wrong with the specification(?).
Comment 1 Benjamin Hawkes-Lewis 2010-12-05 11:19:10 UTC
(In reply to comment #0)
> I don't know if this is the place for this, but
> I think it would be proper for col and colgroup to at *least* have a class and
> a style attribute, and other "on..." events associated with the global
> attributes.  

They already do:

http://dev.w3.org/html5/spec/tabular-data.html#the-col-element

http://dev.w3.org/html5/spec/tabular-data.html#the-colgroup-element

http://dev.w3.org/html5/spec/elements.html#global-attributes

> also, MUCH more CSS (all?) needs to be applied to the col and colgroup
> elements, with the reasoning that whatever you can do with the tr element, you
> should be able to do with the col and colgroup elements.  
> 
> (so what is the difference between col and colgroup anyway if they are only
> going to do backgrounds?)

They don't only do backgrounds; they also do borders, widths, and visibilities.

http://www.w3.org/TR/CSS2/tables.html#columns

> and I think there should also be new
> "row" and "rowgroup" elements as well to match, rows having higher priority.

It would be best if you could stick to one issue per bug report.

Anyhow, there already is a row-grouping element, "tbody":

http://dev.w3.org/html5/spec/tabular-data.html#the-tbody-element

> If you had a red row and green col in a cross formation, I would think that the
> center would be red, unless the cell in the center has its own overriding
> color.

Your expectation is wrong.

"The background properties set the background for cells in the column, but only if both the cell and row have transparent backgrounds."

http://www.w3.org/TR/CSS2/tables.html#columns

> I suspect this is also a problem with lower versions of HTML as well, so there
> needs to be some browser correction across the board.
> 
> I have had problems with IE8, webkit, and firefox, so I figured something must
> be wrong with the specification(?).

The effects of applying CSS to "col" and "colgroup" are specified by the CSS specifications, not HTML5.

Requests for changes should be addressed to the CSS WG not the HTML WG bug tracker:

http://lists.w3.org/Archives/Public/www-style/
Comment 2 Aryeh Gregor 2010-12-05 20:56:08 UTC
The fact that CSS only allows limited styling of columns is a very long-standing problem, which is not easy to solve in a clean way.  Here's one explanation of why:

http://ln.hixie.ch/?count=1&start=1070385285

But it's a CSS problem, not HTML.  The CSS Working Group doesn't use Bugzilla, so you'll have to post to www-style.
Comment 3 Jim Michaels 2010-12-06 08:18:49 UTC
I submitted a separate bug report for the row and rowgroup, Bug 11479.

it is not obvious that tbody is a row grouping element.  by its name I assume this is a container for the whole body of all the tr and td elements collectively, just as the body element contains the content of the page.

but I am suggesting something where I could, in effect,
<col style="font-weight:bold; background-color:red; color:white; border-color-left:brown; border-style-left:solid; border-width-left:thin; border-style-right:none; font-family:Verdana; text-wrap:none; text-decoration:line-through; vertical-align:top; text-align:right;">

CSS like this.  generic stuff that people use everyday in formatting text.  this is what needs to be applied to col, colgroup.

unfortunately, this will never be heard by the CSS folk because they don't listen, so I give up.  I am closing this bug.
Comment 4 Michael[tm] Smith 2011-08-04 05:14:58 UTC
mass-move component to LC1