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

Definition of "text alignment" doesn't match processing requirements #232

Closed
zcorpan opened this issue Oct 30, 2015 · 2 comments
Closed

Comments

@zcorpan
Copy link
Member

zcorpan commented Oct 30, 2015

https://w3c.github.io/webvtt/#webvtt-cue-text-alignment

A text alignment
An alignment for all lines of text within the cue box, in the dimension of the writing direction and the paragraph direction [BIDI], one of:

Start alignment
The text is aligned towards the paragraph direction start side of the cue box.

As far as I can tell, this text is wrong. The processing model sets 'unicode-bidi' to plaintext which isolates paragraphs, and then sets 'text-align' to start for "Start alignment", and the behavior of CSS in that case does not match the description above.

See
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/3719
and flip the value of 'text-align' between start and end (in Gecko or WebKit or Blink), to see what the effect of the processing requirements are.

So for start alignment, each line is aligned to the start edge for that line, which is separate from the cue's "paragraph direction".

My understanding is that @r12a is happy with the effect of the processing requirements, so I suggest we fix the description here to match.

@silviapfeiffer
Copy link
Member

WFM.

@zcorpan
Copy link
Member Author

zcorpan commented Oct 30, 2015

So when this is fixed, I cannot find anything that actually uses the "paragraph direction", since the position alignment now doesn't do anything differently depending on "paragraph direction" (previously, a start-aligned cue with RTL first paragraph would have position alignment be right, but currently it's left (in horizontal)).

There are no CSS properties that apply to ::cue that change behavior depending on what 'direction' is set to, either. (e.g. 'padding-start' would be something that depends on 'direction'.)

Unless I'm missing something, this means that we can drop the "paragraph direction" concept entirely.

zcorpan added a commit that referenced this issue Nov 5, 2015
The rendering rules apply unicode-bidi:plaintext which isolates
each line. Make the definitions for "text alignment" start/end
match the rendering rules. Drop the "paragraph direction" concept
since it was not used for anything that changes the rendered result.
zcorpan added a commit that referenced this issue Nov 9, 2015
The rendering rules apply unicode-bidi:plaintext which isolates
each line. Make the definitions for "text alignment" start/end
match the rendering rules. Drop the "paragraph direction" concept
since it was not used for anything that changes the rendered result.
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