Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is the painting order for image, text, backgroundImage and backgroundColor? #228

Closed
nigelmegitt opened this issue Dec 16, 2016 · 3 comments

Comments

@nigelmegitt
Copy link
Contributor

In the case that a span, for example has more than one of:

  • non-transparent tts:backgroundColor
  • text content
  • a tts:backgroundImage
  • an <image> child (i.e. a "foreground" image)

what is the painting (z) order? Or better yet, where is the painting order specified?

@skynavga
Copy link
Collaborator

skynavga commented Dec 16, 2016 via email

@nigelmegitt
Copy link
Contributor Author

OK happy to include those in the question! Where is the painting order specified?

Looking at CSS 2.1 Appendix E some but not all of those paintable things are listed, so that seems to be incomplete for our purposes. It is not obvious that any of the informative references to CSS 3 complete it either.

@nigelmegitt
Copy link
Contributor Author

I just happened upon https://www.w3.org/TR/css-text-decor-3/#painting-order which I quote here for convenience:

As in [CSS21], text decorations are drawn immediately over/under the text they decorate, in the following order (bottommost first):

  • shadows (‘text-shadow’)
  • underlines (‘text-decoration’)
  • overlines (‘text-decoration’)
  • text
  • emphasis marks (‘text-emphasis’)
  • line-through (‘text-decoration’)

Where line decorations are drawn across box decorations or atomic inlines, they are drawn over non-positioned content and just below any positioned descendants (immediately below layer #8 in CSS2.1 Appendix E).

@skynavga skynavga modified the milestone: TTML2WR Feb 23, 2017
@skynavga skynavga self-assigned this Apr 20, 2017
@skynavga skynavga removed their assignment May 11, 2017
@skynavga skynavga self-assigned this May 23, 2017
skynavga added a commit that referenced this issue May 29, 2017
Add rendering model that defines rendering (painting) order (#228). Merging as there is no actionable request by reviewers. If @nigelmegitt would like the addition of an informative not to provide further clarification, then feel free to propose language and I will make an editorial update to add that language.
@skynavga skynavga removed their assignment May 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants