If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Tables not inheriting color attribute from enclosing div or span

VERIFIED INVALID

Status

()

Core
CSS Parsing and Computation
VERIFIED INVALID
15 years ago
15 years ago

People

(Reporter: Rob Jones, Assigned: dbaron)

Tracking

Trunk
x86
Windows 2000
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

15 years ago
Tables do not inherit color attribute from parent node when that node is a div
or span.

The following code illustrates this.
-------START CODE
<html>
<head>
<style type="text/css" >
.Omega {
	color: #FFFF00;
    background-color: #0000FF;
    border-width: 3px;
    border-style: solid;
    border-color: red;
}
</style>
</head>
<body>
START TEST
<BR>
<BR>Table with class attribute
<BR>
<table class="Omega" border="3">
    <tr>
        <td>A</td>
        <td>B</td>
    </tr>
    <tr>
        <td>C</td>
        <td>D</td>
    </tr>
</table>

<BR>Table within a div containing class attribute
<BR>
<div class="Omega">
<table border="3">
    <tr>
        <td>A</td>
        <td>B</td>
    </tr>
    <tr>
        <td>C</td>
        <td>D</td>
    </tr>
</table>
</div>

<BR>Table within a span containing class attribute
<BR>
<span class="Omega">
<table border="3">
    <tr>
        <td>A</td>
        <td>B</td>
    </tr>
    <tr>
        <td>C</td>
        <td>D</td>
    </tr>
</table>
</span>

<BR>
<BR> The CSS 2 spec states
<BR>color should be inherited (see 14.1 CSS2 Spec)
<BR>background-color should not be inherited. (see 14.2 CSS2 Spec) but should
'shine through' due to default transparency
<BR>Table borders should not be inherited (see 8.5.2 CSS2 Spec)
<BR>
<BR>So the above examples should look like

<BR>Table with class attribute
<BR>
<table class="Omega" border="3">
    <tr>
        <td>A</td>
        <td>B</td>
    </tr>
    <tr>
        <td>C</td>
        <td>D</td>
    </tr>
</table>

<BR>Table within a div containing class attribute
<BR>
<div class="Omega">
<table border="3" style="color: #FFFF00">
    <tr>
        <td>A</td>
        <td>B</td>
    </tr>
    <tr>
        <td>C</td>
        <td>D</td>
    </tr>
</table>
</div>

<BR>Table within a span containing class attribute
<BR>
<span class="Omega">
<table border="3" style="color: #FFFF00">
    <tr>
        <td>A</td>
        <td>B</td>
    </tr>
    <tr>
        <td>C</td>
        <td>D</td>
    </tr>
</table>
</span>


</body>
</html>

-------END CODE
(Assignee)

Comment 1

15 years ago
This *should* work correctly in standards mode.  See
http://mozilla.org/docs/web-developer/quirks/  Does it?  There are some very old
bugs on variants of this issue.  See bug 1044 for references.

It would be helpful if, rather than using "------START CODE" etc., you could use
Bugzilla's attachment feature to attach the code (so that it can be viewed just
by clicking on a link).
(Reporter)

Comment 2

15 years ago
Confirmed.
Works fine in full standards mode.
Point taken about upload attachments. Had looked for this when making
my first bug submission but didnt find it. Have now found. Appears that
you can only add attachments after creating the bug rather than on
the bug creation page itself.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → INVALID
rsv
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.