-
Notifications
You must be signed in to change notification settings - Fork 135
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
Derive direction from document element too #956
Merged
+11
−9
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
5a9e5da
Derive direction from document element too
marcoscaceres 564a776
Ian's feedback
marcoscaceres 6cafa7a
Use "requesting specific"
marcoscaceres 1a78bcb
Remove locale
marcoscaceres d894b79
Revert using direction for now
marcoscaceres File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The direction should also be at the Node level, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should, but there is no such thing on Node unfortunately:
https://dom.spec.whatwg.org/#node
The only "dir"s in the platform are:
https://respec.org/xref/?term=dir
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, wait... we might be able to use https://html.spec.whatwg.org/multipage/dom.html#the-directionality ... but I'll need to get it "exported" so we can use it in our spec.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sent whatwg/html#6676 ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marcoscaceres Thanks. I squinted at
{{HTMLElement/dir}}
and it wasn't clear to me if it included inherited direction.[^html-global/dir^]
is the definition of thedir
attribute and includes inheritance, but doesn't seem quite to match our needs here. Exportingdirectionality
is a better solution--not just here but generally! I may take whatwg/html#6676 to expedite ;-).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LOL. I thought 6676 was an issue, but it's a PR...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aphillips, take a look at @annevk's comments at whatwg/html#6676 ... I think they make a lot of sense.
My feeling is that we punt on the direction for now, and solve this with "localizable" in a future version of the spec.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aphillips, would that work for you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@marcoscaceres I'm pondering a reply to @annevk: I think he is right, although I18N does want to promote using the document's context when it is available and is appropriate.