Skip to content

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

Closed

Description

@r12a

3.4. Emphasis Mark Position: the text-emphasis-position property
https://drafts.csswg.org/css-text-decor-3/#text-emphasis-position-property

This picks up from a comment sent in email by Momdo Nakamura. See
https://lists.w3.org/Archives/Public/www-style/2015Dec/0199.html

Basically Nakamura-san thought that having to always specify two values for text-emphasis-position was painful for the author and unnecessary. I have to agree that i was also surprised by that. It seems it's not only a pain to have to enter double values, but potentially also problematic, since it's unusual to require two values in this way, and i think content authors may forget that they have to do it.

The text in the ED (which i think was changed as a result) says that the values are expressed by:

[ over | under ] && [ right | left ]?

  1. i'm not sure that this is grammatically correct – the && means that both must occur, but the ? means that one doesn't have to occur. Doesn't the && symbol need to become || ?
  2. i have a nagging worry about relying on the browser default stylesheet to produce something sensible, since i think it should be possible to use a similar model for other formats that may not interact with a browser default stylesheet. (For example, TTML2)
  3. over and under mean all sorts of things in CSS at the moment, and i found myself wishing there was a little more standardisation recently, when trying to explain things that cut across text-decoration, ruby, and writing-modes.
  4. a propos (3), writing-modes defines over to mean on the 'ascender side' of vertical text, rather than block-before. This seems a useful approach wrt naming values that could be used also for line-decoration surely? That way there would only need to be two values over and under. (Of course there's a clash with the existing under value name, but that could be fixed by using line-over or line-under (which are less ambiguous anyway), or changing current under to something like clear.

There may well be things i'm missing here. Please let me know if so.

Activity

  1. added
    i18n-trackerGroup bringing to attention of Internationalization, or tracked by i18n but not needing response.
    on Apr 11, 2017
  2. fantasai commented on Oct 19, 2017

    @fantasai
    Collaborator
    1. The grammar is correct, it says that you can specify either clause in either order but the second one is optional. So you can specify over left or just over, but not just left. This forces expressing a preference for horizontal writing modes, where we don't have a clear default.

    2. I'm not sure what your worry is here, so I can't address it. The browser will key off of language tags, which is probably the same as what would happen internally if we had an auto keyword, except that it helps prevent browsers from doing some kind of auto-detection based on the content.

    3. over and under pretty much always mean the line-over and line-under sides, except in the case of underlines and overlines when text-underline-position is over.

    4. This is exactly what the over and under keywords of text-underline-position mean. It's the auto keyword that's not really conforming, but that's normal for auto. ;)

    Let me know if this addresses your concerns or if you have further comments here.

  3. r12a commented on Feb 12, 2018

    @r12a
    ContributorAuthor

    Thanks for the responses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions