Re: [css3-text] Splitting up text-decoration into orthogonal properties

(11/03/26 6:00), Aryeh Gregor wrote:
> [snip]
>
> So instead of having text-decoration be a shorthand for
> text-decoration-line, text-decoration-color, and
> text-decoration-style, instead have it be a shorthand for
> text-underline, text-line-through, text-overline, and text-blink.
> Then text-underline can be a shorthand for text-underline-style (which
> should accept an extra "none" keyword, like border-*-style),
> text-underline-color, and text-underline-cancel, and likewise for
> text-line-through and text-overline.  text-blink would just take
> "blink" and "none" as its properties.  As an added bonus, this would
> allow specifying different styles and colors for different decorations
> on the same element.

These properties used to be in CSS3 Text[1]. I think the reason why they
were removed is as you said, lack of use cases.

(This is similar to an early request to have longhand property for
'transform', by the way. ISSUE-177[2])

> As with my last comment here on text-decoration, the way things are
> currently set up is causing issues for me when speccing execCommand().
>  I want to be able to set a specific property to create an underline,
> without having to worry about unsetting other properties while I do
> it.  text-decoration is the only property that's causing me problems.
> If this change isn't made, I'll have to hack around it by defining
> fake CSS properties and defining execCommand()-specific algorithms to
> get and set them in terms of text-decoration.

Fake CSS properties seem to be rather confusing. Is reusing the
add(token) and remove(token) bits of DOMTokenList[3] a feasible approach?

[1] http://www.w3.org/TR/2003/CR-css3-text-20030514/
[2] http://www.w3.org/Style/CSS/Tracker/issues/177
[3] http://www.w3.org/TR/html5/common-dom-interfaces.html#dom-tokenlist-add

Received on Friday, 25 March 2011 22:01:14 UTC