[css-text-decor] Proposal for the 'text-emphasis-position' property syntax values

(This mail is a repost of my blog article. [1])

Hi,

According to the current css-text-decor-3 spec [2], authors must set 2-values (One value is for horizontal text mode, another value is for vertical text mode).


example 1 (current spec):
em { text-emphasis-position: over right;} /* valid */
em { text-emphasis-position: over; } /* invalid */


However, this current syntax is redundant and painful for authors.
I believe that most authors want to specify either horizontal text mode or vertical text mode, 
because, in the most cases, authors assume a specific text direction and would accept any fallback.

I talked about these values with Xidron on Twitter [3]. 
He claimed that the redundancy is for that the preferred position of emphasis marks is different between Japanese and Chinese (see note of section 3.4 in the spec). 
But I think it does not make sense, because the property is for authors who wish to modify the default behaviour.
I guess only few authors want to tune the both for their purpose, while the majority wants to manipulate only one of them.
Especially, it is redundant for the majority of authors to be always required 2-value syntax in horizontal text mode.
I wonder why both of the two is still required all of the time.

Therefore, I would like to propose the following syntax.


Proposal:
([ over | under ] [ right | left ]?) || ([ right | left ] [ over | under ]?)


example 1 (per proposal):
em { text-emphasis-position: over right;} /* valid */
em { text-emphasis-position: over; } /* valid */


This proposal is to let authors omit one of the two available values.
In this condition, UA has to try to resolve unspecified values, according to such as the lang attribute of HTML. 
Since the preferred position of emphasis marks depends on the document language, UA needs to use the computed document language information anyhow. 
It means that there is no obstacle from this point.


[1] http://momdo.hatenablog.jp/entry/20151213/1449987507
[2] http://www.w3.org/TR/css-text-decor-3/#text-emphasis-position-property
[3] https://twitter.com/upsuperx/status/672029970277928961 (in Japanese)


Regards,
NAKAMURA, momdo

Received on Tuesday, 15 December 2015 11:56:12 UTC