Last Comment Bug 82289 - :first-line and :first-letter pseudos not re-resolved on attribute change
: :first-line and :first-letter pseudos not re-resolved on attribute change
Status: RESOLVED DUPLICATE of bug 8253
[CSS1-2.3][CSS1-2.4]
:
Product: Core
Classification: Components
Component: CSS Parsing and Computation (show other bugs)
: Trunk
: All All
: P2 minor (vote)
: Future
Assigned To: David Baron :dbaron: ⌚️UTC-7 (busy September 14-25)
: Hixie (not reading bugmail)
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2001-05-22 20:23 PDT by Chris Waterson
Modified: 2003-02-13 22:02 PST (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Chris Waterson 2001-05-22 20:23:15 PDT
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.
Comment 1 Pierre Saslawsky 2001-11-05 01:41:27 PST
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>
Comment 2 Kevin McCluskey (gone) 2002-02-22 08:06:50 PST
Bulk moving Mozilla1.01 bugs to future-P1
Comment 3 Madhur Bhatia 2002-05-17 14:28:05 PDT
cc'ing myself
Comment 4 David Baron :dbaron: ⌚️UTC-7 (busy September 14-25) 2002-06-19 21:16:53 PDT
Assigning pierre's remaining Style System-related bugs to myself.
Comment 5 Boris Zbarsky [:bz] (still a bit busy) 2003-02-13 22:02:55 PST

*** This bug has been marked as a duplicate of 8253 ***

Note You need to log in before you can comment on or make changes to this bug.