dynamically added ::first-letter and ::first-line rules not applied

NEW
Unassigned

Status

()

Core
CSS Parsing and Computation
P3
normal
16 years ago
3 years ago

People

(Reporter: Daniel Dawson, Unassigned)

Tracking

(Depends on: 1 bug, Blocks: 1 bug, {css1, testcase})

Trunk
Future
css1, testcase
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(5 attachments)

(Reporter)

Description

16 years ago
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0rc1) Gecko/20020417
BuildID:    2002041711

If an alternate stylesheet specifies a rule using the :first-letter or
:first-line pseudo-element, but no rule in the default stylesheet matches the
same pseudo, the former rule is ignored for that element.

For instance, if the default stylesheet says the first letter of a given
paragraph should be green, and the alternate stylesheet says red, both are
honored, but if the "green" rule is missing, both are rendered using the
inherited value.


Reproducible: Always
Steps to Reproduce:
1. View any page that does not specify a style rule for a given
:first-letter or :first-line pseudo-element in its default stylesheet but does
specify such a rule in an alternate stylesheet
2. Use the View > Use Style menu to switch to the alternate stylesheet


Actual Results:  The rule in the alternate stylesheet is ignored.

Expected Results:  The rule in the alternate stylesheet should be applied; the
default stylesheet should not affect alternate stylesheets.
(Reporter)

Comment 1

16 years ago
Created attachment 84145 [details]
HTML file linking to default and alternate stylesheets
(Reporter)

Comment 2

16 years ago
Created attachment 84146 [details]
Default stylesheet (version 1) for attachment 84145 [details]

(Re)name to default.css to test.
(Reporter)

Comment 3

16 years ago
Created attachment 84147 [details]
Default stylesheet (version 2) for attachment 84145 [details]

(Re)name to default.css to test.
(Reporter)

Comment 4

16 years ago
Created attachment 84148 [details]
Alternate stylesheet for attachment 84145 [details]

Name it alternate.css to test.
Summary: :first-letter and :first-line pseudos ignored in alternate stylesheet if not used in default stylesheet → [RR/RCF]:first-letter and :first-line pseudos ignored in alternate stylesheet if not used in default stylesheet

Comment 5

16 years ago
This looks remarkably like bug 126072 although that is
about :before and :after pseudo classes
(Reporter)

Comment 6

16 years ago
Hmm. Not only are they remarkably alike, it looks like they're one and the same.
(Both caused by a general problem with pseudo-elements.) Would it be appropriate
to call this a dup?
No.

Comment 8

15 years ago
Created attachment 85283 [details]
testcase with correct links to the style sheets

this testcase uses 
- attachment 84146 [details] for default-1 stylesheet
- attachment 84147 [details] for default-2 stylesheet
- attachment 84148 [details] for Alternate stylesheet

Comment 9

15 years ago
I see the bug on linux, win2000 and macOS 9.1.

Confirming the bug.

Repeating reporter's comment : 
"If an alternate stylesheet specifies a rule using the :first-letter or
:first-line pseudo-element, but no rule in the default stylesheet matches the
same pseudo, the former rule is ignored for that element."

Severity: normal → major
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: testcase
OS: Linux → All
Priority: -- → P3
Hardware: PC → All
Severity: major → normal
Status: NEW → ASSIGNED
Priority: P3 → P2
Target Milestone: --- → mozilla1.2alpha
This may be the same problem as bug 23604.
Depends on: 23604
Priority: P2 → P3
Summary: [RR/RCF]:first-letter and :first-line pseudos ignored in alternate stylesheet if not used in default stylesheet → [RR/RCF]dynamically added :first-letter and :first-line rules not applied
Target Milestone: mozilla1.2alpha → Future
Depends on: 8253

Updated

14 years ago
Keywords: css1
Summary: [RR/RCF]dynamically added :first-letter and :first-line rules not applied → dynamically added ::first-letter and ::first-line rules not applied
Assignee: dbaron → nobody
Status: ASSIGNED → NEW
QA Contact: ian → style-system
Duplicate of this bug: 1062621
Blocks: 1106759

Comment 12

3 years ago
When inverting Default-1 and Default-2 it works fine. Maybe It’s because it wasn’t defined before…
You need to log in before you can comment on or make changes to this bug.