Bug 14558

Summary: CSS3 content property doesn't work with text or attr() values
Product: WebKit Reporter: Lars Andersson <larsm.andersson>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Enhancement CC: ahmad.saleem792, ap, bfulgham, dglazkov, mitz, rik, rniwa, simon.fraser, webkit, webkit, zalan
Priority: P4 Keywords: HasReduction
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
URL: http://www.w3.org/TR/css3-content/#replacedContent
Attachments:
Description Flags
testcase none

Description Lars Andersson 2007-07-07 17:07:40 PDT
The CSS3 content property fails to be applied when using string or attr() values (it works with images though).

Tested with nightly build r24061 (522.4.1) on Windows XP SP2.
Comment 1 Lars Andersson 2007-07-07 17:09:36 PDT
Created attachment 15440 [details]
testcase
Comment 2 mitz 2007-07-07 22:21:43 PDT
In CSS 2.1, the 'content' property applies only to :before and :after pseudo-elements. WebKit supports string, URI, counter and attr content on :before and :after.
Comment 3 mitz 2007-07-07 22:29:09 PDT
(In reply to comment #2)
> In CSS 2.1

Just ignore what I said :-)
Comment 4 Robert Blaut 2008-02-09 15:23:14 PST
Since CSS3 Generated and Replaced Content Module is still working draft I mark this bug as an enhancement request.
Comment 5 Ahmad Saleem 2022-08-07 05:39:26 PDT
I am unable to reproduce this bug in Safari 15.6 on macOS 12.5 and

Image: Success

Text: Failure

attr(): Failure

and it is same across all browsers (Chrome Canary 106 and Firefox Nightly 105). I am going to mark this as "RESOLVED CONFIGURATION CHANGED". Thanks!