Flex RGBA colors in CSS

Posted by jscheel on Stack Overflow See other posts from Stack Overflow or by jscheel
Published on 2010-05-12T18:49:13Z Indexed on 2010/05/12 18:54 UTC
Read the original article Hit count: 178

Filed under:
|

Hello all, I am trying to style a DataGrid component so that the background is transparent (Flex 4). Rgba colors work fine if I make "alternatingItemColors" an attribute on the component, but if I try to declare it in my css stylesheet, I cannot declare the alpha value.

Works (mxml):

<mx:DataGrid id="songGrid" width="800" height="529" dataProvider="{songs}" itemClick="handleRowClick(event);" x="145" y="168" headerStyleName="dataGridHeader" alternatingItemColors="[0xFFFFFFFF, 0xFFFFFFFF]">

Doesn't Work (css):

mx|DataGrid {
    alternatingItemColors: #FFFFFFFF, #FFFFFFFF;
}

If I enter the values as "0xFFFFFFFF", I get a parse error, because it's not proper css (of course, most of flex's css isn't proper css, but I digress...). So, is there any way to declare the alpha value of these colors in the css?

© Stack Overflow or respective owner

Related posts about flex

Related posts about flex4