Implement the `:nth-col()` and `:nth-last-col()` pseudo class for table cells

NEW
Unassigned

Status

()

enhancement
P3
normal
13 years ago
5 months ago

People

(Reporter: dbaron, Unassigned)

Tracking

(Blocks 1 bug, {dev-doc-needed})

Trunk
Future
Points:
---
Dependency tree / graph
Bug Flags:
blocking1.9.1 -
wanted1.9.1 -

Firefox Tracking Flags

(Not tracked)

Details

()

We should implement a :-moz-nth-column() pseudo-class that applies to table cells (and maybe table columns, although the utility there is limited).  It should have syntax equivalent to the css3-selectors :nth-child pseudo-class described in http://www.w3.org/TR/css3-selectors/#nth-child-pseudo .  I'd rather not implement all the other pseudo-classes similar to :nth-child, since I think things like :first-column, :last-column, and :only-column are less likely to be useful for columns than they are for children.

The :-moz-nth-column pseudo-class should operate on the semantic tabular structure of the document.  It has no effect on things that are not semantically tabular, and it still works on something that is semantically tabular but displayed without display: table*.

This should be pretty easy to implement once bug 915 is fixed, since fixing bug 915 requires adding the ability to compute which column a cell is in.

PLEASE DO NOT COMMENT ON THIS BUG UNLESS YOUR COMMENT WILL CONTRIBUTE TO FIXING IT OR HELP YOU CONTRIBUTE TO FIXING IT.
Note that the naming of this pseudo-*class* should be distinguished from any pseudo-*element* for multi-column column boxes.
QA Contact: ian → style-system
Assignee: dbaron → nobody
Status: ASSIGNED → NEW
Flags: wanted1.9.1?
Priority: -- → P3
Flags: wanted1.9.1?
Flags: wanted1.9.1-
Flags: blocking1.9.1-
http://dev.w3.org/csswg/selectors4/#table-pseudos now as a draft of this selector, :nth-column(an+b) along with :nth-last-column(an+b) and :column(selector-list).
Blocks: selectors-4

The pseudo‑classes were renamed to :nth‑col(An+B) and :nth‑last‑col(An+B).

Also, instead of :column( <selector‑list> ), there’s now the column combinator (||).


P.S.: I’m glad that this wasn’t implemented prefixed because that would’ve been yet another prefixed feature to unprefix as part of bug 775235.

Keywords: css-moz
Summary: implement :-moz-nth-column() pseudo class for table cells → Implement the `:nth-col()` and `:nth-last-col()` pseudo class for table cells
You need to log in before you can comment on or make changes to this bug.