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
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-8
: Hixie (not reading bugmail)
: Jet Villegas (:jet)
Depends on:
  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:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Description User image 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.

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

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

N.B. that this works fine:

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

Interesting bug, because fixing it may have an impact on the the proposed fix
for bug 79508.
Comment 1 User image 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; }
Comment 2 User image Kevin McCluskey (gone) 2002-02-22 08:06:50 PST
Bulk moving Mozilla1.01 bugs to future-P1
Comment 3 User image Madhur Bhatia 2002-05-17 14:28:05 PDT
cc'ing myself
Comment 4 User image David Baron :dbaron: ⌚️UTC-8 2002-06-19 21:16:53 PDT
Assigning pierre's remaining Style System-related bugs to myself.
Comment 5 User image 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.