Closed Bug 82289 Opened 24 years ago Closed 22 years ago

:first-line and :first-letter pseudos not re-resolved on attribute change

Categories

(Core :: CSS Parsing and Computation, defect, P2)

defect

Tracking

()

RESOLVED DUPLICATE of bug 8253
Future

People

(Reporter: waterson, Assigned: dbaron)

Details

(Whiteboard: [CSS1-2.3][CSS1-2.4])

See attached test case, which should force style to be re-resolved on a
paragraph, applying the :first-letter pseudo.

  <html>
  <head>
    <style type="text/css">
       body.styled p.firstletter:first-letter { color: blue; }
    </style>
  </head>
  <body onload="document.body.setAttribute('class', 'styled');">
    <p class="firstletter">
      The letter `T' should be blue.
    </p>
  </body>
  </html>

Expected: `T' is blue.
Actual: nothing happens.

N.B. that this works fine:

  <style type="text/css">
    p.firstletter:first-letter { color: blue; }
  </style>

Interesting bug, because fixing it may have an impact on the the proposed fix
for bug 79508.
The other interesting thing is that if there is any style on the first letter, 
then the attribute change on the body causes a style resolution.

    <style type="text/css">
       body.styled  { color: red; font-size:24px;}
       p.firstletter:first-letter { color: green;}
       body.styled p.firstletter:first-letter { color: blue; }
    </style>
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → mozilla1.0.1
Bulk moving Mozilla1.01 bugs to future-P1
Priority: P3 → P1
Target Milestone: mozilla1.0.1 → Future
Whiteboard: [CSS1-2.3][CSS1-2.4]
cc'ing myself
Assigning pierre's remaining Style System-related bugs to myself.
Assignee: pierre → dbaron
Status: ASSIGNED → NEW
Priority: P1 → P2

*** This bug has been marked as a duplicate of 8253 ***
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.