Hi Tucker,
Thanks for your reply. What I'm trying to do is to get my CSS exploring
tool to work in the latest version of Webtop. Previously, Webtop used
CSS applied directly to views/classes. Now, some CSS is applied to
instances of a class called Skin.
So a developer says:
>> Skin[name="mySkin"] {
>> backgroundColor: #ff0000;
>> textColor: #00ff00;
>> }
The skins use normal style bindings, e.g.
<class name="Skin" extends="node">
<attribute name="mouseOverFillColor"
value="$style{'mouseOverFillColor'}"/>
</class>
However, when I get a reference to a skin and try to find out the CSS
that applies to it, e.g.
LzCSSStyle.getRulesCache(gWebtop.skinManager.silver)
... I get an empty array. In the debugger, I can verify that the
style-bound class attributes of gWebtop.skinManager.silver are in fact set:
gWebtop.skinManager.silver.mouseOverFillColor is actually set to the
value specified in the CSS file.
I'm cc-ing Maynard on this, since he's the person on the Webtop team
familiar with CSS, in case it rings any bells. However, from looking at
the code, I don't see anything funny in the way that skins are styled
(vs. any other view) in Webtop.
-Antun
P T Withington wrote:
There is not a public API for doing this. getRulesCache only gets the
rules that apply to a particular node.
What are you really trying to do?
There is a Debugger function Debug.explainStyleBindings that might be of
use, if you are just trying to look at the styles that apply to a node.
On 2009-03-19, at 20:27EDT, Antun Karlovac wrote:
In CSS in OpenLaszlo, you can kind-of define a CSS class like this:
Skin[name="mySkin"] {
backgroundColor: #ff0000;
textColor: #00ff00;
}
Does our implementation of CSS create an object somewhere that
represents this selector?
Basically, I'm trying to get a hold of the CSS properties that are
defined for Skin[name="mySkin"]. Is LzCSSStyle.getRulesCache() the
only way to go?
Thanks,
Antun