In this example, gwb and jeb are descendants of preston and george,
george is a descendant of preston, and preston isn't anybody's
descendant.
<stylesheet>
/* this should apply only to preston */
styledbox {
stylebgcolor: "0x515151";
styleinnercolor: "0xFF8888"; // pink
}
/* this should apply only to george */
styledbox styledbox {
styleinnercolor: "0x8888FF"; // blue
}
/* This should apply only to jeb and gwb */
styledbox styledbox styledbox {
styleinnercolor: "0x88FF00"; // green
}
</stylesheet>
<class name="styledbox" width="70" height="70" bgcolor="$style
{'stylebgcolor'}" >
<view name="inner" bgcolor="$style{'styleinnercolor'}" x="5"
y="5" width="10" height="10" />
</class>
<styledbox id="preston" width="150">
<styledbox id="george" x="30" width="150" y="20">
<styledbox x="50" id="jeb" y="20"/>
<styledbox x="70" id="gwb" y="20"/>
</styledbox>
</styledbox>
When you run this, you get a pink inner box for preston, a blue inner
box for george, and two green inner boxes for jeb and gwb.
Hope this helps...
-ben
On Oct 5, 2006, at 12:04 PM, Frisco Del Rosario wrote:
> Can someone provide a minimal example of a descendant selector using
> our CSS implementation?
>
> I printed a hard copy of B. Shine's test/style/descendantselector/
> complex-descendant-selector-test.lzx plus the libraries that the test
> includes, but cannot figure out how to implement one descendant
> selector.
>
> --
> Frisco Del Rosario
> Tester, OpenLaszlo and IDE4Laszlo
>
>
>
>
> _______________________________________________
> Laszlo-dev mailing list
> [email protected]
> http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev