Closed
Bug 125506
Opened 23 years ago
Closed 23 years ago
[FIX]DIR attribute is ignored in LI element
Categories
(Core :: Layout, defect, P2)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla1.0
People
(Reporter: lkemmel, Assigned: bzbarsky)
References
()
Details
Attachments
(3 files, 1 obsolete file)
1.06 KB,
text/html
|
Details | |
1014 bytes,
text/html
|
Details | |
2.61 KB,
patch
|
dbaron
:
review+
attinasi
:
superreview+
|
Details | Diff | Splinter Review |
DIR attribute in <LI> element has no effect since mozilla 0.9.2. It's working in older builds. Tested only on Windows NT, but probably happens for all platforms.
Reporter | ||
Comment 1•23 years ago
|
||
DIR attribute, inherited by LI from its parent, works fine.
Comment 2•23 years ago
|
||
Mozilla's current behaviour is broken, but it's not clear to me what is the correct rendering of a <li dir="rtl"> within a <ul dir="ltr">. The ordering of the item's text should definitely be right-to-left, but where should the bullet be? Is the location of bullets a function of the directionality of the list or the directionality of the item? To me it seems more logical and natural to say that it is a function of the directionality of the list, i.e. that the bullets will be on the same side of every item in a given list. By the same token, if you have a <tr dir="ltr"> within a <table dir="rtl">, I would not expect the order of cells in that row to be right-to-left and other rows to be left-to-right.
The CSS formatting model would suggest that the bullet should be on the side given by the direction of the list-item, since there is no special list formatting object -- the UL is just a normal block (with padding-left, though, which should really be padding-start, which is a rather ugly issue if the direction changes in the middle). But the CSS3 lists module may have something different to say. cc:ing Ian.
Does the CSS 'direction: rtl;' work?
Comment 5•23 years ago
|
||
CSS 'direction: rtl;' does work.
Comment 6•23 years ago
|
||
To amplify comment 5: using CSS it works according to dbaron's interpretation: the bullet appears on the right, and the text is orderered from right-to-left. That was also the formatting preferred by people on the W3C HTML list; see http://lists.w3.org/Archives/Member/w3c-html-wg/2002JanMar/0171.html for those with access.
Comment 7•23 years ago
|
||
Updated•23 years ago
|
QA Contact: petersen → amar
Status: UNCONFIRMED → NEW
Ever confirmed: true
Updated•23 years ago
|
Target Milestone: --- → Future
Comment 8•23 years ago
|
||
Ouch. Nasty issue. I think what David describes is correct though. If you don't want to move the bullet, then use <span dir=""></span>. No?
Comment 9•23 years ago
|
||
OK, it looks as if there is consensus (with me in a dissenting minority of one) on the correct way to render an RTL list item, and Mozilla renders like that when the direction is set in CSS. The bug is only when direction is set by the |dir| attribute in HTML. Parsing issue?
Assignee | ||
Comment 10•23 years ago
|
||
Assignee | ||
Comment 11•23 years ago
|
||
List items were dropping common attributes (dir and lang) on the floor...
Assignee | ||
Comment 12•23 years ago
|
||
taking bug. reviews?
Assignee: attinasi → bzbarsky
OS: Windows NT → All
Priority: -- → P2
Hardware: PC → All
Summary: DIR attribute is ignored in LI element → [FIX]DIR attribute is ignored in LI element
Target Milestone: Future → mozilla1.0
Comment on attachment 70871 [details] [diff] [review] Patch to fix r=dbaron
Attachment #70871 -
Flags: review+
nsHTMLTableCaptionElement has the same problem. Want to fix that too? (cc:ing bernd so he knows about it, since it would cause all stylistic attributes not to work on caption elements.)
Assignee | ||
Comment 15•23 years ago
|
||
I checked and all the other classes seem to do this correctly.
Attachment #70871 -
Attachment is obsolete: true
Comment on attachment 70930 [details] [diff] [review] Patch fixing LI and CAPTION r=dbaron
Attachment #70930 -
Flags: review+
Comment 17•23 years ago
|
||
Comment on attachment 70930 [details] [diff] [review] Patch fixing LI and CAPTION sr=attinasi
Attachment #70930 -
Flags: superreview+
Assignee | ||
Comment 19•23 years ago
|
||
checked in
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•