Re: W3 Note: text-transform and transparency

From the Note:
>51. Transliteration
>Instead of becoming a new property, transliteration could be added to
>'text-transform':
>SPAN.foreign {text-transform: uppercase nl}

I would warn against such a solution. This means that both properties
can not be set alone individually but only together. This means the the
following stylesheet will fail:

:lang(nl) { text-transform:nl }

.important { text-transform:capitalize }

because elements that are have CLASS "important" and are in Dutch would
only be capitalized and not transliterated because the second rule
overrides the first.
In this case that could be solved by

.important:lang(nl) { text-transform:capitalize nl }

but as soon as the stylesheet grows a little longer, this becomes hard
to manage.

I would rather propose a property "transliteration":
Value:   <language-code> | lang | none | inherit
Initial:   none
Applies to:   all elements
Inherited:   yes
Media:   all

"lang" uses the language of the element (the same as for the :lang())
selector (just an idea).

The same goes for

>26. Transparency
>Transparency can also be added to the <color> type, e.g.: rgba(40%,
40%, 100%,70%), for a 70% opaque light blue.

This means that you can only set color and transparency together and
thus has the same problems. And what happens to the transparency if only
a color (e.g. #abcdef) is specified? Is it reset or kept from a previous
rgba() declaration?
If there were a property "transparency" as well (to set transparency
alone), there would be two properties for the same thing with the
problem which takes precedence.

I think it would be better just to use a property "transparency" (or
possibly "foreground-transparency", "background-transparency" and
"border-transparency" with "transparency" as a shorthand, if such fine
control is desired):
Value:   percentage | none | inherit
Initial:   none  (equal to 0%)
Applies to:   all elements
Inherited:   yes
Media:   visual

Christian Kaufhold

Received on Thursday, 31 December 1998 06:46:37 UTC