W3C home > Mailing lists > Public > www-style@w3.org > February 2017

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

From: Pierre-Anthony Lemieux <pal@sandflow.com>
Date: Thu, 2 Feb 2017 10:01:43 -0800
Message-ID: <CAF_7JxAqZ6fc7EQJacqyvVScezJAgh1VuZ3N0mOxZCY9oH+4zQ@mail.gmail.com>
To: Momdo Nakamura <xmomdo@gmail.com>
Cc: fantasai <fantasai.lists@inkedblade.net>, www-style list <www-style@w3.org>
Hi all,

Have you considered the proposed emphasis positions specified in TTML2 WD?

https://www.w3.org/TR/ttml2/#style-value-emphasis-position

'before' and 'after' are used instead of combinations of 'over',
'under', 'left' and 'right'. In addition, the 'outside' keyword is
defined.

It would be good to keep CSS and TTML aligned, as they have been in the past.

Best,

-- Pierre

On Wed, Dec 28, 2016 at 5:14 AM, Momdo Nakamura <xmomdo@gmail.com> wrote:
>> So I think we can simplify to
>>
>>    text-emphasis-position: [ over | under ] && [ right | left ]?
>>
>> Does this work for you?
>
> Sounds good.
> Since most web contents authors always don't intend to write pages on vertical,
> it seems to me that omitting [ right | left ] make sense.
>
>
> Cheers,
> Momdo
>
>> On 12/15/2015 03:04 PM, Momdo Nakamura wrote:
>> > (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 */
>>
>> Since both languages have a preference for emphasis marks on
>> the right in vertical text, then it seems to me that omitting
>> [ left | right ] should be no problem, defaulting to right.
>>
>> Omitting [ over | under ] I think would be more of a problem,
>> since this option is the one that tends to vary, and there
>> could be an incorrect result even in a vertical document if
>> there was, e.g. a horizontal caption or footnote with emphasis.
>>
>> So I think we can simplify to
>>
>>    text-emphasis-position: [ over | under ] && [ right | left ]?
>>
>> Does this work for you?
>>
>> > 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.
>>
>> The preference in position is established through the UA default
>> style sheet, so it is not magic built into the feature itself.
>>
>> ~fantasai
>
>
>
>
>
>
Received on Thursday, 2 February 2017 18:03:06 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 2 February 2017 18:03:07 UTC