Closed
Bug 72358
Opened 24 years ago
Closed 23 years ago
:table has border-spacing: 2px
Categories
(Core :: Layout: Tables, defect, P2)
Core
Layout: Tables
Tracking
()
RESOLVED
FIXED
mozilla0.9.7
People
(Reporter: ian, Assigned: dbaron)
References
()
Details
(Keywords: css2, testcase, Whiteboard: [Hixie-P3] [easy fix])
Attachments
(2 files)
577 bytes,
patch
|
dbaron
:
review+
|
Details | Diff | Splinter Review |
618 bytes,
patch
|
ian
:
review+
attinasi
:
superreview+
|
Details | Diff | Splinter Review |
In html.css, the :table rule sets 'border-spacing' and 'border-collapse'. It should inherit both of them. I would guess we could change the rules like this: ========================= change this... ========= /* tables */ table, :table { display: table; border-spacing: 2px; border-collapse: separate; margin-top: 0; margin-bottom: 0; -moz-box-sizing: border-box; } ========================= to this... ============= /* tables */ table { display: table; border-spacing: 2px; border-collapse: separate; margin-top: 0; margin-bottom: 0; -moz-box-sizing: border-box; } :table { display: table; } ================================================== ...because: border-spacing is inherited by default border-collapse is inherited by default margin-top has '0' as the initial value anyway margin-bottom has '0' as the initial value anyway I'm not sure about the -moz-box-sizing declaration, will :table ever be given an explicit width? If not, then the declaration is moot, no? You can see the effect of this change at: http://www.hixie.ch/tests/adhoc/css/box/table/001.xml Without the fix, there is lots of red. With the fix, there is only a thin border of red (caused by the bug which is depending on this bug).
Reporter | ||
Updated•24 years ago
|
Comment 3•23 years ago
|
||
Correct me if I am wrong, but the CSS2 specification requires the following initial values: table { border-spacing: 0; border-collapse: collapse; } See http://www.w3.org/TR/REC-CSS2/tables.html#propdef-border-collapse
Assignee | ||
Comment 4•23 years ago
|
||
The CSS2 spec also allows for a UA stylesheet to specify the default layout of any markup language.
Reporter | ||
Comment 5•23 years ago
|
||
Evan: that's non-normative. I would like to change my previous proposal to include !important in the rule for :table. Ideally, of course, we wouldn't have to resolve psuedo-style on these anonymous elements at all and those frames would just "know" that they are table frames... Is there any reason _not_ to fix the bug as proposed?
Whiteboard: [Hixie-P3] [easy fix] (py8ieh: ho hum)
Reporter | ||
Comment 6•23 years ago
|
||
Reassigning to hyatt as per discussion.
Assignee: karnaze → hyatt
Status: ASSIGNED → NEW
Whiteboard: [Hixie-P3] [easy fix] (py8ieh: ho hum) → [Hixie-P3] [easy fix]
Assignee | ||
Comment 7•23 years ago
|
||
r=dbaron on Ian's proposal. We should investigate sometime whether our default values for 'border-collapse' and 'empty-cells' are correct.
Assignee | ||
Comment 9•23 years ago
|
||
Oh, I'll take this and get it in.
Assignee: hyatt → dbaron
Priority: -- → P2
Target Milestone: mozilla1.0 → mozilla0.9.5
Assignee | ||
Updated•23 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Updated•23 years ago
|
Target Milestone: mozilla0.9.5 → mozilla0.9.6
Comment 12•23 years ago
|
||
Assignee | ||
Comment 13•23 years ago
|
||
Comment on attachment 52089 [details] [diff] [review] Hixie's patch as an attachment r=dbaron
Attachment #52089 -
Flags: review+
Assignee | ||
Comment 14•23 years ago
|
||
Although, could someone double-check that the changes to -moz-box-sizing and to border-collapse don't cause problems?
Reporter | ||
Comment 15•23 years ago
|
||
I can guarentee that the change to border-collapse will have no effect. :-) Not sure about -moz-box-sizing though.
Assignee | ||
Comment 16•23 years ago
|
||
Assignee | ||
Updated•23 years ago
|
Target Milestone: mozilla0.9.6 → mozilla0.9.7
Comment 17•23 years ago
|
||
Comment on attachment 56975 [details] [diff] [review] safer patch sr=attinasi
Attachment #56975 -
Flags: superreview+
Comment 18•23 years ago
|
||
I'm curious about how :table is used. I thought it was used to create an anonymous table in case, for example, a rowgroup is inserted into some non-table container. In that case, I would expect that table and :table should have the same style properties. From looking at Ian's testcase, it seems we use :table for arbitrary elements with display:table - is this right? Is there a disconnect between these two uses?
Reporter | ||
Comment 19•23 years ago
|
||
Comment on attachment 56975 [details] [diff] [review] safer patch r=hixie
Attachment #56975 -
Flags: review+
Assignee | ||
Comment 20•23 years ago
|
||
The :table pseudo-element is used in one place, nsCSSFrameConstructor::CreatePseudoTableFrame. Presumably that means it's only used for anonymous content, although I could imagine there might be some cases where we construct unneeded anonymous content (missing row groups?).
Assignee | ||
Comment 21•23 years ago
|
||
Fix checked in 2001-11-10 17:35 PDT.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 22•23 years ago
|
||
Actually, in Ian's testcase, the table frame is an anonymous table object -- nothing has 'display: table' -- it's a table-row inside a float.
You need to log in
before you can comment on or make changes to this bug.
Description
•