W3C home > Mailing lists > Public > www-style@w3.org > April 2009

Re: text-align property for columns (once again)

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 8 Apr 2009 13:47:56 -0500
Message-ID: <dd0fbad0904081147s2132a3fbh41dc829276103f49@mail.gmail.com>
To: Reg Me Please <regmeplease@gmail.com>
Cc: Brad Kemper <brad.kemper@gmail.com>, "L. David Baron" <dbaron@dbaron.org>, "www-style@w3.org" <www-style@w3.org>
On Wed, Apr 8, 2009 at 1:35 PM, Reg Me Please <regmeplease@gmail.com> wrote:
> On Wed, 2009-04-08 at 09:59 -0500, Tab Atkins Jr. wrote:
>> On Wed, Apr 8, 2009 at 2:05 AM, regme please <regmeplease@gmail.com> wrote:
>> > 2009/4/7 Tab Atkins Jr. <jackalmage@gmail.com>
>> >> Well, the implementers already know the problems with it, but what
>> >> would you like to see for authors?
>> >>
>> >> ~TJ
>> >
>> > First of all, what'd be your interpretation for chapter 17.5.4?
>> I'd interpret it exactly as it sounds.  The text-align property
>> determines the horizontal alignment of the contents of a cell.  The
>> issue at hand, though, is where a cell can *inherit* a text-align
>> value from.  Normally elements inherit from their parents, and the
>> tree-based model of an HTML document allows an element to have only a
>> single parent.  Because of how the HTML table model works (which CSS
>> copied), the row is the natural parent of the cell.
> If the chapter title was "Horizontal alignment in a cell" your
> interpretation would be true.
> But the title reads instead "Horizontal alignment in a column".
> It's that last word ("column") that makes me think those last words as
> if they were "the 'text-align' property OF THE COLUMN".
> And this is why I would call for more details in that chapter.

Heh, true, that is confusing.  Of course, the actual text of that
section doesn't refer to columns at all.

>> It's certainly possible to define some form of conflict resolution
>> that allows you to 'inherit' values from multiple places, and that's
>> precisely what is done with the four properties that can be applied to
>> a <col> element - the drawing of cell borders, frex, depends on the
>> border-* values of potentially *many* elements.  But this is a
>> well-defined algorithm.
> This extension would make the column very useful for tabular data
> defined by column. And I still don't see why cannot use the same
> algorithm used for the width.
> I think I understand the core concepts that animate the CSS and I can
> appreciate the structure of everything.
> Nonetheless I feel the pain as they badly fail to help in solving a
> problem that I'm pretty sure has kicked any author at least once in the
> a**.

As I expressed, the issue is deciding just how one would want this to
act.  You can be indirect about it, such as by defining a global value
like "inherit-column" which changes where a cell inherits a value
from.  Or you can be direct about it, such as through the :col and
:nth-col pseudoclasses, where you specify values directly on the td,
but only if they are within a particular column.

>> The issue is deciding what makes sense for arbitrary properties.
> Not really arbitrary. I mean the ones I find in the mark up language
> (aka HTML) for the very same element. Columns in my case.
> But no browser seems interested in rendering <COL> properties in the
> proper way.

Sorry, I forget sometimes that most people don't use 'arbitrary' in a
technical sense.  ^_^  I just meant "any property other than the ones
I've explicitly referred to".  Text-align qualifies as an 'arbitrary'
property here, as would 'color' (these were chosen as both of them are
specifiable on <col> elements in HTML, but not in CSS).  There's
currently no defined algorithm for conflict resolution between row and
column inheritance, so it defaults to standard inheritance (from the
parent, which in this case means from the row).

Received on Wednesday, 8 April 2009 18:48:36 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:35 UTC