Closed
Bug 1225655
Opened 9 years ago
Closed 9 years ago
[gaia-fast-list] Conform to RTL list spec
Categories
(Firefox OS Graveyard :: Gaia::Components, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: wilsonpage, Assigned: wilsonpage)
References
()
Details
Attachments
(1 file)
Assignee | ||
Comment 1•9 years ago
|
||
Sam can you think of any cases throughout the Gaia that the attached spec wouldn't be appropriate. Do we still depend on `dir=auto` or is there any way we can implement the spec with just CSS?
Flags: needinfo?(sfoster)
Comment 2•9 years ago
|
||
As I mentioned in bug 1217779, you'll need dir="auto" for fixing paren-balancing and ensuring that ellipses go on the correct side of the text. Just setting text-align isn't enough, since Gecko needs to have boundaries for the text to know exactly what run of text should be isolated from the rest of the document. Without dir="auto", if Gecko gets to a paren at the end, then it doesn't know if it should match the directionality of the previous text (say, LTR), or the directionality of the following text (which is usually the document's directionality, say RTL).
In Unicode terms, I think dir="auto" is like wrapping the text with FSI (first strong isolate) and PDI (pop directional isolate) characters. In other words, saying, "isolate the direction of this block of text from the stuff around it."
Comment 3•9 years ago
|
||
Oh, and just as a note, there is a CSS "direction" property, but 1) it doesn't support "auto", and 2) it's only there as a convenience for styling things that can't set directionality in the content (read: not HTML). The folks who write the CSS specs would strongly advise users to set dir in their HTML and not in their CSS, since directionality is part of the content and not so much about the style of the content.
Comment 4•9 years ago
|
||
(In reply to Wilson Page [:wilsonpage] from comment #1)
> Sam can you think of any cases throughout the Gaia that the attached spec
> wouldn't be appropriate. Do we still depend on `dir=auto` or is there any
> way we can implement the spec with just CSS?
So the component should probably implement the text-align to follow the document direction - at the list component level those rules are applicable globally, and an author should have to knowingly override that behavior. But the dir="auto" and responsibility for correctly rendering potentially bi-directional content in the list falls to the content - the <li> template, and the content itself if necessary. The component isn't in a position to know how to render or hint to the bidi algorithm on how to render what goes into its list items. Does that answer the question?
Flags: needinfo?(sfoster)
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → wilsonpage
Assignee | ||
Comment 5•9 years ago
|
||
Attachment #8689497 -
Flags: review?(squibblyflabbetydoo)
Comment 6•9 years ago
|
||
Comment on attachment 8689497 [details]
pull-request (master)
Looks good to me! I have one comment on GitHub about this that might be an issue, but otherwise, I think this is the right way to handle mixed-directionality content for gaia-fast-list.
There are probably similar issues elsewhere in the gaia-components. As I see them, I'll file bugs.
Attachment #8689497 -
Flags: review?(squibblyflabbetydoo) → review+
Assignee | ||
Comment 7•9 years ago
|
||
Comment on attachment 8689497 [details]
pull-request (master)
https://github.com/gaia-components/gaia-fast-list/commit/af094a17ce479c31df6a0a98b52a9aac5e285ff7
Assignee | ||
Updated•9 years ago
|
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•