W3C home > Mailing lists > Public > www-style@w3.org > December 2008

Re: [CSS3] CSS Text Level 3, 6.1: text-align: string

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 31 Dec 2008 08:24:10 -0600
Message-ID: <dd0fbad0812310624g73d6c3eaieb0e757ec7dbd25b@mail.gmail.com>
To: "Brad Kemper" <brad.kemper@gmail.com>
Cc: "CSS mailiing list W3C" <www-style@w3.org>

On Tue, Dec 30, 2008 at 4:36 PM, Brad Kemper <brad.kemper@gmail.com> wrote:
> 2. Also, I don't know if it has been brought up before or not, but
> when text-align:<string> is applied to a non-table-cell, shouldn't it just
> be ignored, instead of being treated as "start"? That seems like it would
> allow for more reasonable fallback behavior. Thus, if I class something to
> align on a decimal in a table cell, I might want it to be right aligned if
> that class was applied to something other than a table cell, and I could put
> that in the rule like this:
> { text-align:right; text-align: '.'; }
> Which is what I would probably do anyway if the cell contained dollar
> amounts that usually showed two decimal places, as it would also help in
> getting the alignment to be consistent in UAs that did not yet support
> string alignment.

I agree with this - it seems to be a much more natural (and useful)
default to simply have the value ignored when used on elements where
it is invalid.

> 3. Shouldn't "When applied to a table cell" be replaced by "When applied to
> a table cell, table column, or table column group"? Is is it considered to
> be inherited from those, and thus "applied" indirectly?

No; text-align isn't one of the four properties that are 'inherited'
from columns to cells.

> This seems like the
> wording in #2 (above) also comes into play: if I apply text-align: '.' to a
> TABLE element, should it be inherited by the TDs of that table? If it is
> "treated as 'start'", then the TDs would inherit it as 'start' also,
> wouldn't they?

I agree that it should be possible to set text-align: '.' on a <table>
and have the value inherit down as-is, merely being ignored for the
<table>, <tbody>, <tr>, etc. elements.

> 4. Shouldn't "that also have a character value for 'text-align' will align"
> be replaced by "that also have the same <string> value for 'text-align' will
> align"? After all, some cells in the column could align to some other
> character, couldn't they (if they had a different class, for instance)?

Agreed.  I'm certain that's what was intended, but the wording can
certainly be cleared up here.

> I propose this alternate wording:
> <string>When applied to a table cell, table column, or table column group,
> the string specifies a character on which all cells in its table column that
> also have the same <string> value for 'text-align' will align. When applied
> to any other element, it must be ignored by that element as if it were an
> unsupported value (but not by its decedent elements, which may still inherit
> the character alignment). The string must be a single character; otherwise
> the declaration must be ignored.

Other than the "table column, or table column group, " part, I like
this wording.

Received on Wednesday, 31 December 2008 14:24:51 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:42 UTC