Last Comment Bug 399854 - <col style="display: none"> do not hide table cells
: <col style="display: none"> do not hide table cells
Status: RESOLVED DUPLICATE of bug 141984
:
Product: Firefox
Classification: Client Software
Component: General (show other bugs)
: unspecified
: x86 Windows XP
: -- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-10-15 06:52 PDT by Eugen Konkov
Modified: 2007-10-17 14:58 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
testcase (517 bytes, text/html)
2007-10-17 05:58 PDT, Eugen Konkov
no flags Details

Description Eugen Konkov 2007-10-15 06:52:03 PDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7

When style="display: none" for given column is set no one columns is hided

Reproducible: Always

Steps to Reproduce:
<table><col style="width: 100px; display: none;"><col><tr><td style="visible: false;">1</td><td>2</td></tr></table>


Expected Results:  
col style is applyed to columns so they will have corresponding values
Comment 1 Brian Polidoro 2007-10-15 07:23:34 PDT
Columns can only affect four properties of cells.  Display is not one of them.
http://www.w3.org/TR/CSS21/tables.html#columns
Comment 2 Eugen Konkov 2007-10-15 07:44:53 PDT
Are you shure?
http://www.w3.org/TR/1999/REC-html401-19991224/struct/tables.html#edef-COL
See. Attributes defined elsewhere
Comment 3 Brian Polidoro 2007-10-15 08:19:27 PDT
The CSS spec is clear which is what Mozilla currently follows.  The contradiction between the CSS spec and the HTML spec is bug 915.  
Comment 4 Gérard Talbot 2007-10-15 21:04:04 PDT
Eugen, Brian is correct.

This is clearly a DUPLICATE of bug 141984. Resolving as such

*** This bug has been marked as a duplicate of bug 141984 ***
Comment 5 Gérard Talbot 2007-10-15 21:08:02 PDT
Eugen, if you want to toggle the display of a column, then use the CSS 2.x declaration visibility: collapse and not display. Support for visibility: collapse is currently not good in modern browsers, including Firefox

http://www.w3.org/TR/CSS21/tables.html#dynamic-effects

http://www.gtalbot.org/DHTMLSection/TableRowColumnCollapse.html
Comment 6 Eugen Konkov 2007-10-16 00:31:35 PDT
How about color, font? There is no reason to restrict properties applying from col.style to cells
Comment 7 Eugen Konkov 2007-10-16 00:47:35 PDT
Row and Columns are same entities. Think about table as horizontall instead of verticall. So rows and columns must have same power
Comment 8 Gérard Talbot 2007-10-16 01:02:35 PDT
Eugen, please consult the link mentioned by Brian in comment #1
Comment 9 Eugen Konkov 2007-10-16 01:30:37 PDT
It says nothing that style of col element can not be applyed to cell
From the example I can see that col have style property too
Because of spec does not say that: "You can not set style for col" or "All properties of style MUST BE ignored except: border, background, width, visibility"

"The following properties apply to table elements:
align ...
background ...
bgcolor ..."
There nothings said that table have "style" property and YOU allow any values in style of table to affect it. Why you deny values in style of col element to affect cells? As I have said "w3" RECOMENDATION says nothing about "style" property of col element. So you have no any reason to deny that
Comment 10 Gérard Talbot 2007-10-16 11:42:08 PDT
> How about color, font?

Use the adjacent sibling selector. E.g.:
http://css-discuss.incutio.com/?page=StylingColumns
http://yelotofu.com/2007/05/styling-table-columns/
http://www.info.com.ph/~etan/w3pantheon/style/selectomania.html 

MSIE 7 and Firefox 2 support the first-child selector and the adjacent sibling selector.



> It says nothing that style of col element can not be applyed to cell

"cells are descendants of rows, never of columns"
http://www.w3.org/TR/CSS21/tables.html#columns

Please consult bug 915

-------

Eugen, please remember that bugzilla is a place to file, report, confirm, investigate (and eventually fix) bugs happening in mozilla software. Not a place where we can discuss and debate at length. Not a dedicated place to get support for web development. There are programming discussion forums where you can seek assistance, including CSS development forums, web standards forums, web development tutorials (http://developer.mozilla.org/), etc.

Regards, Gérard
Comment 11 Gérard Talbot 2007-10-16 11:44:03 PDT
The mystery of why only four properties apply to table columns
http://ln.hixie.ch/?start=1070385285&count=1


Comment 12 Eugen Konkov 2007-10-17 05:58:05 PDT
Created attachment 285225 [details]
testcase
Comment 13 Eugen Konkov 2007-10-17 06:31:13 PDT
>>http://www.info.com.ph/~etan/w3pantheon/style/selectomania.html 
Ok. I can write in CSS "tr:first-child+tr+tr+tr+tr+tr td:first-child+td+td+td+td+td+td {...}" But altering this is not simple

>> It says nothing that style of col element can not be applyed to cell
>"cells are descendants of rows, never of columns"
>http://www.w3.org/TR/CSS21/tables.html#columns
Implicitly it means: 
Cells are descendants of rows
Rows are descendants of row groups
Row groups are descendants of columns
Columns are descendants of column groups
Column groups are descendants of table

http://www.w3.org/TR/CSS2/tables.html#table-layers

>http://ln.hixie.ch/?start=1070385285&count=1
>ince you have to take into account what cells span several columns, etc.
cells can span several rows too

>So you know which cell is in which column during stage 3, and not earlier. 
>But the stage where you would work out what the color property of a cell is step 2! 
As you see in an attachment. Background works fine. So you know which cell is in which column on stage 2! So there is no problem to inherit style for cells from columns.

NOTICE: w3.org RECOMENDATION (http://www.w3.org/TR/CSS21/tables.html#columns) does not say that: "You can not set style for col" or "All properties of style MUST BE ignored except: border, background, width, visibility"

So. This is the BUG
Comment 14 Joshua Cranmer [:jcranmer] 2007-10-17 12:46:15 PDT
(In reply to comment #13)
> >> It says nothing that style of col element can not be applyed to cell
> > "cells are descendants of rows, never of columns"
> >http://www.w3.org/TR/CSS21/tables.html#columns
> Implicitly it means: 
> Cells are descendants of rows
> Rows are descendants of row groups
> Row groups are descendants of columns
> Columns are descendants of column groups
> Column groups are descendants of table
> 
> http://www.w3.org/TR/CSS2/tables.html#table-layers

Your quoting structure is a little off here, implying that you are arguing the meaning of the preamble of §17.3; not of §17.5, which is my interpretation.

Nevertheless, you have a problem in that there is no place where row groups are defined, implicitly or explicitly, to be descendants of columns. Rows and row groups form their own separate layers from columns and column groups.

> NOTICE: w3.org RECOMENDATION (http://www.w3.org/TR/CSS21/tables.html#columns)
> does not say that: "You can not set style for col" or "All properties of style
> MUST BE ignored except: border, background, width, visibility"
> 
> So. This is the BUG
> 

Let me ask you a simple question: according to CSS, does a table cell inherit from a table column? §17.3 clearly states that it does not, as Gérard so nicely pointed out for you. Therefore, any attribute from a table-column is not inherited in a table-cell, unless the table-cell is a child of the table-column (possible if you change the display properties). §17.5.1 also shows very nicely that a column is a separate element and why the four specified properties appear to inherit: the column attributes are all background elements "peeking" through to the cell elements.

I recommend RESOLVE INVALID.
Comment 15 Gervase Markham [:gerv] 2007-10-17 14:58:49 PDT
Eugen: you need to accept that arguing in this bug will not persuade Mozilla developers to ignore the spec (or, if you prefer to put it that way, change their interpretation of the spec) and emulate IE. The link given in comment #11 explains why this isn't easy.

If you want to argue for a spec change, here is not the place to do it. Please respect the developers and leave the bug resolved.

Gerv

*** This bug has been marked as a duplicate of bug 141984 ***

Note You need to log in before you can comment on or make changes to this bug.