Hi Brian,

For Alternate Row Colors in Jewel List and Table.

just added two beads for workaround nth-child creating dynamic css rules at
runtime. I consider it temporal while we fix compiler css problems. One
bead is for List the other for Table. They have two default colors, but can
be configured via "oddColor", and "evenColor". I get the "hovered" and
"selected" colors from emphasized selectors in Jewel CSS and create a new
ones with that for the dynamic style.

For List :

<j:List ...>
<j:beads>
<j:ListAlternateRowColor oddColor="rgb(255, 255, 255)" evenColor="rgb(241,
248, 253)"/>
</j:beads>
</j:List>

For Table:

<j:Table ...>
<j:beads>
<j:TableAlternateRowColor/>
</j:beads>
</j:Table>

HTH

Carlos



El jue., 16 jul. 2020 a las 0:02, Brian Raymes (<brian.ray...@teotech.com>)
escribió:

> As a workaround, you can add any style that doesn’t’ work with the
> compiler in a <style> section in your html template. I’ve been doing this
> for a long while now as it not just keyframes that the compiler doesn’t
> like.
>
>
>
> For example, in addition to keyframes, to add alternating row colors and
> custom highlights to lists, I have added the following to my
> index-template.html file as adding an nth-child() to the css also creates a
> compilation error.
>
>
>
>     <style>
>
>       .alternatingHighlight .jewel.item:nth-child(even) {
>
>         background: #F2F2F2;
>
>       }
>
>
>
>       . alternatingHighlight .jewel.item:nth-child(odd) {
>
>         background: #FFFFFF;
>
>       }
>
>
>
>       . alternatingHighlight .jewel.item.primary.hovered {
>
>         background: #5fd2f0;
>
>       }
>
>     </style>
>
>
>
> Then, I add className="alternatingHighlight" to any list that I wish to
> have this coloring.
>
>
>
> I’m using this same idea for custom animations with Keyframe as well.
>
>
>
> Brian
>
>
>
> *From:* Carlos Rovira <carlosrov...@apache.org>
> *Sent:* Wednesday, July 15, 2020 10:06 AM
> *To:* users@royale.apache.org
> *Subject:* Re: css rule @keyframes
>
>
>
> Thanks Nicolas.
>
> Hope someone could take a look at it
>
> best
>
>
>
> Carlos
>
>
>
>
>
> El mié., 15 jul. 2020 a las 16:11, Nicolas Aguttes (<
> nicolas.agut...@gmail.com>) escribió:
>
> Hello Carlos,
>
>
>
> I filled an issue
>
>
>
> Nicolas
>
>
>
> Le mer. 15 juil. 2020 à 16:05, Carlos Rovira <carlosrov...@apache.org> a
> écrit :
>
> Hi Nicolas,
>
>
>
> I face the same issue few days ago. Please fill an issue in compiler [1],
> so others could take a look.
>
> I found keyframes compile right, but doesn't reach the final css. I think
> even in a library are populated right too if I remember correctly.
>
> I have the same problem and would like to see it solved.
>
>
>
> [1] https://github.com/apache/royale-compiler/issues/new
>
>
>
>
>
> El mié., 15 jul. 2020 a las 15:50, tranquiliste (<
> nicolas.agut...@gmail.com>) escribió:
>
> Hello all,
>
> I wanted to include the  css rule @keyframes in my css file but apparently
> it is not populated in the css file generated by Apache Royale
>
> Is there a way to do it?
>
> Thanks
> Nicolas
>
>
>
> -----
> Nicolas
> --
> Sent from: http://apache-royale-users.20374.n8.nabble.com/
>
>
>
>
> --
>
> Carlos Rovira
>
> http://about.me/carlosrovira
>
>
>
>
>
>
> --
>
> Carlos Rovira
>
> http://about.me/carlosrovira
>
>
>


-- 
Carlos Rovira
http://about.me/carlosrovira

Reply via email to