WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
84834
CSS Specificity: First-line style(if present) is always applied
https://bugs.webkit.org/show_bug.cgi?id=84834
Summary
CSS Specificity: First-line style(if present) is always applied
Pravin D
Reported
2012-04-25 03:31:24 PDT
Issue: According to
http://www.w3.org/TR/selectors/#specificity
and
http://www.w3.org/TR/2009/CR-CSS2-20090908/cascade.html#specificity
The specificity of a first-line selector much be less than ID selectors, class selectors and inline style. However on webkit , the first-line style seems to applied irrespective of the presence of any other selectors or inline style. Steps to reproduce: Open the attached test case. There should be no red text visible.
Attachments
Test Case
(653 bytes, text/html)
2012-04-25 03:32 PDT
,
Pravin D
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Pravin D
Comment 1
2012-04-25 03:32:27 PDT
Created
attachment 138773
[details]
Test Case
Shane Stephens
Comment 2
2012-04-25 21:39:35 PDT
because ::first-line is a pseudo-element selector, div::first-line doesn't select the same thing as #div1 or div.divclass. The test case you provide demonstrates expected behaviour - you can think about the pseudo-element selector as a selector that introduces extra structure to the document and then styles the structure that is created: <div class="divclass"><::first-line>Filler Text Filler Text Filler Text</::first-line><br>...</div>
Pravin D
Comment 3
2012-04-26 08:50:24 PDT
(In reply to
comment #2
)
> because ::first-line is a pseudo-element selector, div::first-line doesn't select the same thing as #div1 or div.divclass. The test case you provide demonstrates expected behaviour - you can think about the pseudo-element selector as a selector that introduces extra structure to the document and then styles the structure that is created: > > <div class="divclass"><::first-line>Filler Text Filler Text Filler Text</::first-line><br>...</div>
Ah!!! sorry... got it
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug