Comment 385 for bug 353877

Revision history for this message
In , Korisu (korisu) wrote :

David, you should know by now that "deprecated presentational attributes requested" are fighting words in the context of this thread, but I'd like to discuss bug 371323 that you mentioned, instead.

I understand that as a volunteer contributor to an open-source project, the type of work that you are interested in doing does affect what makes it into the end product. On that note, I read the spec in the proposed selectors4 draft for :column(). I'd like to encourage you to pursue that implementation. I think that doing so will help both of us. It seems to be defined well enough from a CSS perspective to let you write it in a way that is compatible with the rest of your CSS engine. Once you have a :-moz-column() pseudo-class selector in place, couldn't you just add this set of rules to the internal Mozilla default stylesheet?

:-moz-column(col[align="left" ]) { text-align: left ; }
:-moz-column(col[align="center" ]) { text-align: center ; }
:-moz-column(col[align="right" ]) { text-align: right ; }
:-moz-column(col[align="justify" ]) { text-align: justify; }
:-moz-column(col[valign="top" ]) { vertical-align: top ; }
:-moz-column(col[valign="middle" ]) { vertical-align: middle ; }
:-moz-column(col[valign="bottom" ]) { vertical-align: bottom ; }
:-moz-column(col[valign="baseline"]) { vertical-align: baseline; }

Similar rules could be added for align/valign in colgroups:
:-moz-column(colgroup[align="left"] > col) { text-align: left; }

The downsides I see with this approach:
- it wouldn't cover align="char" and charoff
- I don't know if it'd be possible to handle cols with span defined
- assigning styles directly to the <col> element (e.g. col.style.textAlign = "center") wouldn't update the style

The upsides to this approach:
- it'd probably be good enough for most of the people in this thread
- it would be fairly harmless to add at that point (via the default stylesheet)
- it would finally bring an end to 13 years of fighting over this damn bug.

So please, godspeed on bug 371323. :)