You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@royale.apache.org by leokan23 <le...@gmail.com> on 2018/08/21 10:22:50 UTC
Can you use CSS to change the style
I am evaluating Royale for a very small project and I was wondering if there
is a tutorial or it is even possible to change the overall look of the
components with just CSS.
For example, this is a button css I made for testing:
Can I use this somehow for "skinning" my button?
If there is a tutorial, other than sample code, I would appreciate it.
--
Sent from: http://apache-royale-users.20374.n8.nabble.com/
Re: Can you use CSS to change the style
Posted by Piotr Zarzycki <pi...@gmail.com>.
Hi Leo,
I think that is absolutely no problem. You can take a look into my example
[1] where I'm using additional.css file to draw hex on my website [2]
That css is included in index.html template [3]. During the build you are
pointing that template by using compiler
option: -html-template=src/resources/mdl-js-index-template.html
Example of usage one of the class from the css file [4].
[1]
https://github.com/piotrzarzycki21/TranspiledActionScript/blob/examples/Examples/TranspiledActionScriptWebsite/src/resources/additional.css
[2] http://transpiledactionscript.com/
[3]
https://github.com/piotrzarzycki21/TranspiledActionScript/blob/33fbb8c9a4342ae92e6eaf57aa10eb64c0566933/Examples/TranspiledActionScriptWebsite/src/resources/mdl-js-index-template.html#L26
[4]
https://github.com/piotrzarzycki21/TranspiledActionScript/blob/33fbb8c9a4342ae92e6eaf57aa10eb64c0566933/Examples/TranspiledActionScriptWebsite/src/views/MainView.mxml#L107
Thanks,
Piotr
wt., 21 sie 2018 o 12:22 leokan23 <le...@gmail.com> napisał(a):
> I am evaluating Royale for a very small project and I was wondering if
> there
> is a tutorial or it is even possible to change the overall look of the
> components with just CSS.
>
> For example, this is a button css I made for testing:
>
>
>
> Can I use this somehow for "skinning" my button?
>
> If there is a tutorial, other than sample code, I would appreciate it.
>
>
>
> --
> Sent from: http://apache-royale-users.20374.n8.nabble.com/
>
--
Piotr Zarzycki
Patreon: *https://www.patreon.com/piotrzarzycki
<https://www.patreon.com/piotrzarzycki>*
Re: Can you use CSS to change the style
Posted by Carlos Rovira <ca...@apache.org>.
Right! My opinion if that Royale brings the best of Flex and the best of
HTML/CSS/JS stack. Best of both worlds! ;-)
El mar., 21 ago. 2018 a las 12:39, leokan23 (<le...@gmail.com>)
escribió:
> Thanks Carlos,
>
> if this is as easy as it is in pure html, it will be awesome for quickly
> building tools.
>
>
>
> --
> Sent from: http://apache-royale-users.20374.n8.nabble.com/
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>
> <http://apache-royale-users.20374.n8.nabble.com/>
>
>
Re: Can you use CSS to change the style
Posted by leokan23 <le...@gmail.com>.
Thanks Carlos,
if this is as easy as it is in pure html, it will be awesome for quickly
building tools.
--
Sent from: http://apache-royale-users.20374.n8.nabble.com/
Re: Can you use CSS to change the style
Posted by Carlos Rovira <ca...@apache.org>.
Hi Leokan
yes you can use CSS to override whatever you want. This is inherent to how
HTML/CSS works, so no problem.
Moreover, Royale works processing CSS when compiling, so if you override a
rule, then in the output you'll find yours instead the one defined in
framework :)
If you're using Jewel, you have many work on themes and you can take for
example, JewelTheme, and make your own version, just copy paste the
project and start to change, then compile and provide that theme to your
project.
You have as well many other ways to change CSS, inline style in component
declaration, add <fx:Style> like in old flex, and add rules to you App
external .css file
Carlos
El mar., 21 ago. 2018 a las 12:22, leokan23 (<le...@gmail.com>)
escribió:
> I am evaluating Royale for a very small project and I was wondering if
> there
> is a tutorial or it is even possible to change the overall look of the
> components with just CSS.
>
> For example, this is a button css I made for testing:
>
>
>
> Can I use this somehow for "skinning" my button?
>
> If there is a tutorial, other than sample code, I would appreciate it.
>
>
>
> --
> Sent from: http://apache-royale-users.20374.n8.nabble.com/
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>
> <http://apache-royale-users.20374.n8.nabble.com/>
>
>