css-$15.lzx

<canvas height="120" width="100%">

  <stylesheet>

    [height="50"] {
      height: 50;
      width: 100;
      bgcolor: #FF0000;
    }

    [width="100"] {
      height: 50;
      width: 100;
      bgcolor: #0000FF;
    }

  </stylesheet>

  <simplelayout axis="y" spacing="10"/>

  <view name="short" width="100" height="50" bgcolor="$style{'bgcolor'}"/>

  <view y="75">
    <text text="If I'm red, the first stylesheet was triggered."/>
  </view>

  <view y="100">
    <text text="If I'm blue, the second stylesheet was triggered."/>
  </view>

</canvas>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
     * Copyright 2007, 2008 Laszlo Systems, Inc.  All Rights Reserved.                   *
     * Use is subject to license terms.                                            *
     * X_LZ_COPYRIGHT_END ****************************************************** -->

Cross References

Named Instances