Closed Bug 262624 Opened 21 years ago Closed 21 years ago

[FIX]normal (default value) content in generated text with :after and :before does not override more general rule with content set

Categories

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

DEC
All
defect

Tracking

()

RESOLVED FIXED
mozilla1.8alpha5

People

(Reporter: stan, Assigned: bzbarsky)

Details

Attachments

(2 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.7.3) Gecko/20040910 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.7.3) Gecko/20040910 Following the invalid bug #262607 <https://bugzilla.mozilla.org/show_bug.cgi?id=262607> I've tested the the new CSS 2.1 default value of content property for :after and :before. If I try to override a general rule that inserts generated content with a more specific rule with content set to the default value ( normal ) which should not generate any content nor change box size, then I still have got some text inserted. Reproducible: Always Steps to Reproduce: Use the following CSS code : a:before { content: "<"; } a:after { content: ">"; } a[class~="imglink"]:before { content: normal; } a[class~="imglink"]:after { content: normal; } and, in a standards compliance mode HTML file, insert the following : <a href="" class="imglink"> <img src="img/zoom.png" class="bouton" /> </a> <br /> <a href="">Volcane</a> Actual Results: both links have '<' and '>' around them. Expected Results: only the second link should have '<' before and '>' after. The first link is of class imglink, and should have normal content, thus no generated text before or after it.
Indeed. Thanks for filing the bug!
Assignee: nobody → dbaron
Status: UNCONFIRMED → NEW
Component: Layout: Fonts and Text → Style System (CSS)
Ever confirmed: true
QA Contact: core.layout.fonts-and-text → ian
Attached file Testcase
Attached patch PatchSplinter Review
Comment on attachment 161166 [details] [diff] [review] Patch This just adds "normal" a as a recognized content value and skips content computation altogether if that's the cascaded value.
Attachment #161166 - Flags: superreview?(dbaron)
Attachment #161166 - Flags: review?(dbaron)
Assignee: dbaron → bzbarsky
OS: Windows XP → All
Priority: -- → P3
Hardware: PC → DEC
Summary: normal (default value) content in generated text with :after and :before does not override more general rule with content set → [FIX]normal (default value) content in generated text with :after and :before does not override more general rule with content set
Target Milestone: --- → mozilla1.8alpha5
Comment on attachment 161166 [details] [diff] [review] Patch Since it looks like we parse -moz-initial, do you want to check for that as well? Other than that, sr=dbaron.
Attachment #161166 - Flags: superreview?(dbaron)
Attachment #161166 - Flags: superreview+
Attachment #161166 - Flags: review?(dbaron)
Attachment #161166 - Flags: review+
Fixed, with the change to treat "-moz-initial" as "normal"
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: