Open Bug 329763 Opened 20 years ago Updated 3 years ago

border-collapse does not inherit into table due to rule in UA style sheet

Categories

(Core :: CSS Parsing and Computation, defect)

x86
Windows XP
defect

Tracking

()

People

(Reporter: eira, Unassigned)

Details

(Keywords: testcase)

Attachments

(2 files)

According to CSS2.1, border-collapse should inherit. This does not happen in Firefox.
Attached file Testcase
Keywords: testcase
Attached patch PatchSplinter Review
This might be a WONTFIX, although I doubt this patch will have any side effects.
Assignee: nobody → sharparrow1
Status: NEW → ASSIGNED
Attachment #270494 - Flags: review?(dbaron)
For what it's worth, this dates back to when the CSS spec made 'border-collapse: collapse' the initial value and we had to specify table { border-collapse: separate } in the UA style sheet. How do other browsers behave? I can guess it does inherit in Opera...
Component: Layout → Style System (CSS)
QA Contact: layout → style-system
(In reply to comment #3) > How do other browsers behave? I can guess it does inherit in Opera... Windows browsers: It does inherit in Opera, it doesn't inherit in Safari, and IE doesn't support border-collapse.
IE/Windows has supported border-collapse for ages.
Oh, right. Brain fart. But I don't really understand why IE is rendering this testcase so much differently from other browsers...
Not supporting border-style: hidden, perhaps? So what do IE/Windows and Safari do? Do they have default styles, or do they treat border-collapse as non-inherited? You can distinguish using testcases with anonymous table objects using explicit 'inherit', and checking computed styles on rows, cells, and contents of cells. (I suspect only the latter works in IE.)
Looks like Safari has a similar style rule to what we have. It does not inherit in Internet Explorer.
Comment on attachment 270494 [details] [diff] [review] Patch I honestly don't understand why border-collapse is an inherited property at all, but given than Safari has this in the UA style sheet as well, I don't see why we shouldn't leave it too.
Attachment #270494 - Flags: review?(dbaron) → review-
Summary: border-collapse does not inherit → border-collapse does not inherit into table due to rule in UA style sheet
Does that make this WONTFIX?
How solid is your info on what IE/Windows does?
Pretty solid; I used currentStyle to check on a couple of divs, which shouldn't have the style set by default. (I suppose it's possible there's a rule like "* {border-collapse: separate}" in IE's UA stylesheet, but it would be impossible to tell the difference since IE doesn't support inherit.)
I checked the state of some browsers today against this bug. My testcase resides at http://gmta.nl/bugs/tablecssbug.html. The results: IE6: does not inherit IE8: inherits Firefox 3.5: does not inherit Opera 9: inherits Safari 4 (win32): does not inherit Google Chrome 2: does not inherit It seems that IE8 and Opera 9 adhere closer to border-collapse as defined by the W3C than Safari, Firefox and Chrome. I would very much like to see Firefox obeying the inheriting rule for this property.
Assignee: sharparrow1 → nobody
Status: ASSIGNED → NEW
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: