Closed GoogleCodeExporter closed 9 years ago
You must use the camel-case variation of style names (this is consistent
throughout My
Library. I can change it to convert to camel-case (without introducing any
real
performance issues) if there is any call for it. Personally, I've always
preferred to
use camel-case.
E(theTarget).setStyles({'backgroundColor':'none','color':'none'});
Original comment by dmark.ci...@gmail.com
on 27 Mar 2010 at 6:28
It doesn't work with camel case either.
E(theTarget).setStyles({"backgroundColor":"#33ffff","color":"#0000ff"});
this will not set the background color from #33ffff to none:
E(theTarget).setStyles({"backgroundColor":"none","color":"none"});
Original comment by johnwloc...@gmail.com
on 27 Mar 2010 at 11:29
Those aren't valid values for the color or background-color styles.
http://www.w3.org/TR/CSS2/colors.html#background-properties
Must be a valid color, "inherit" or "transparent". You can do this:
.someclass {
background: transparent none
}
...but that is shorthand for:-
.someclass {
background-color: transparent;
background-image: none
}
Original comment by dmark.ci...@gmail.com
on 28 Mar 2010 at 5:11
Well I'll be a son of a gun, none is invalid for background color. My goal is
to remove the background-color
property in a style attribute so as to let the definition of the CSS selector
take over. I observed that setting it to
'none' achieved this affect, but I'm learning not to rely on observation over
standards specification.
How about a function to remove a style property?
Original comment by johnwloc...@gmail.com
on 28 Mar 2010 at 5:56
You can do that with setStyle/setStyles:-
E(theTarget).setStyles({"backgroundColor":"","color":""});
Original comment by dmark.ci...@gmail.com
on 28 Mar 2010 at 6:03
Excellent! Thanks for telling about this feature.
Original comment by johnwloc...@gmail.com
on 28 Mar 2010 at 6:08
No problem at all. That's what I'm here for. :)
Original comment by dmark.ci...@gmail.com
on 28 Mar 2010 at 6:27
Original issue reported on code.google.com by
johnwloc...@gmail.com
on 26 Mar 2010 at 3:34