gehuangyi20 / ie7-js

Automatically exported from code.google.com/p/ie7-js
0 stars 0 forks source link

:after/:before image-content #48

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. .someselector:before/after { content: url(mypicture.png); }
2. Line 2410 in IE8.js: (entity.charAt(0) == "'") ? getString(entity) :
decode(entity);
3. decode() does not work

What is the expected output? What do you see instead?

 An image.

What version of the product are you using? On what operating system?

 IE8, XP 64

Please provide any additional information below.

 Well, in my limited case a replacement like this:

 decode(entity)
becomes
 ('<img src="'+entity.replace("url(","").replace(")","")+'" />')

 is a working only-have-twenty-seconds-left-fix.
 I actually didn't have the time to dig after what exactly decode() is
suppose to do (I saw a src=...blank in the <!>-element though, so I guess
it's doing something in a vague correct direction), otherwise I would have
send you a complete fix. Sorry. :-|

 The fix isn't completely doing want I want anyway, because my CSS is this:

#content > #nav .category > ul ul > li input[checked] +
a[onclick]:hover:before {
    content: url(pics/knob-minus.png);
}

 Reacting on the hover is missing, but for that I give up (make the image
transparent, put an element around, set the image as background of that
element, and define a "... > img:first-child:hover" selector that switches
the background image ... puh ... what if the hover-element replaces the
content with a string? ...). It's cosmetic anyway.

Original issue reported on code.google.com by niels.fr...@gmail.com on 29 Feb 2008 at 12:03

GoogleCodeExporter commented 9 years ago
This is fixed in version 2.1.

Original comment by dean.edw...@gmail.com on 10 Feb 2010 at 1:36