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

Allow initial style to be constrained to an element type? #1234

Open
nigelmegitt opened this issue May 27, 2021 · 1 comment
Open

Allow initial style to be constrained to an element type? #1234

nigelmegitt opened this issue May 27, 2021 · 1 comment

Comments

@nigelmegitt
Copy link
Contributor

Whereas some style attributes, such as tts:backgroundColor apply to multiple types of element, e.g. region, div, p etc, only one value of any style may be specified in the initial element. This means it is not possible, say, to set the initial value for tts:backgroundColor only as applied to span elements.

Would others find it useful to be able to specify this semantic?

@skynavga
Copy link
Collaborator

My initial thoughts come down to:

  • The initial values for style definitions are currently defined in a global scope, without any constraint as to application. This is consistent with XSL FO and CSS.
  • Adding a constraint such as element type begs the question of what other type of selectors might apply, and soon we may have full blown XSL selectors, e.g., an element of a given type that is a descendant of an element of another type that has an attribute of certain value, etc. A slippery slope.
  • This would require a substantial change to the style resolution algorithm.
  • As this is a new feature, it would need new Schema support as well as new feature designators defined; in other words, a new profile. In the past, we agreed to put new features into the next major revision, which at the moment is TTML3. Has that changed?

Overall, I wonder if this level of effort is justified by introducing what is essentially a convenience mechanism for authoring tools that could do this another way that already exists, i.e., assigning styles directly to the affected elements (in whatever rich context the authoring tool sees fit).

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