<cssfonts>
A mixin to control font attributes with CSS style properties.

JavaScript: lz.cssfonts

The <cssfonts> mixin adds CSS font styling to <text>

<cssfonts> implements a subset of the CSS fonts specification http://www.w3.org/TR/css3-fonts/

Example 33. Using CSS styleable fonts

<canvas height="60">
    <stylesheet>
      view.styled {
        font: bold italic 24 helvetica, sans-serif;
      }
    </stylesheet>
    <include href="mixins/cssfonts.lzx"/>
    <view styleclass="styled" layout="axis: y; spacing: 5">
      <text>This is a demonstration of NOT styling fonts with CSS</text>
      <text with="cssfonts">This is a demonstration of styling fonts with CSS</text>
    </view>
</canvas>

Attributes

Name (CSS property) Type (tag) Type (js) Default Category
bgcolor color Color white read/write
background-color  
css_font cssfontspecification Cssfontspecification   read/write
font The font of the element
css_font_family string String null read/write
font-family The font family of the element
css_font_size number Number null read/write
font-size The font size of the element
css_font_style string String null read/write
font-style The font style of the element
css_font_variant string String null read/write
font-variant The font variant of the element
css_font_weight string String null read/write
font-weight The font weight of the element
css_line_height string String null read/write
line-height The line height of the element
direction string String ltr read/write
direction  
fgcolor color Color black read/write
color