Hi Alex,

I didn't realize that I can add two themes to the build. If that's possible
in flex I never did.

So my main question here is, what happens if I have the same style in both
themes, what will win? will be both in the final app?
For example I can make JewelTheme used alone be some kind of default theme
(greyed or wireframed) and when added JewelBlueTheme, be colored in blue
So in JewelTheme and JewelBlueTheme will have the same style with
"background-color" set in one to grey and in the other one to blue.
Don't need to answer this, I'll try to do it myself and see what happen.

Comparing with for example MDL. I think they created lots of palettes and
build all combinations of final CSSs (thanks to using SASS). I think we can
do the same, although once we have a 1 or 2 themes working, that would be
work to do. I think Semantic does something similar. We can choose some
colors and offer those themes as part of royale. For other colors people
will need to create it themselves, even pull request us to include as part
of our release. We only loose one thing respect to foro example MDL: The
way to indicate two basic colors and get the final CSS, or maybe we could
consider that add to the -theme JewelTheme the word "Blue", can be enough.
All of this already means only *one color* (jewel-blue), and if we want
something more material should be jewel-blue-green for example

Regarding the problem with alone csss in maven, I think the right way is to
use a theme folder structure, so I really doesn't think that as a bug but
like a feature hehe ;)

With SASS, I only see a problem in the workflow. That can be solved as soon
as people not using SASS take care of it.
If someone changes the produced css without touch the sass files, this will
make that a new SASS compilation overrides the changes.
That is easy to solve since we all have to take care to not change one
without the other.

In the other hand, and after some days of playing with SASS, I want to
share that my experience is very positive and now understand why the rest
of theme frameworks out there uses some kind of css development tool
(Material uses SASS, Semantic LESS, ...). As a theme/UX developer is the
same I already mentioned, not using this will be like authoring an icon
without a creative tool like Sketch or Photoshop. I continue thinking that
SASS should not be part of Royale but maybe in people using ant should
introduce in the concrete case of JewelTheme the sass compilation. But not
for the rest (Basic , and others). Think of this as a sugerence, but for me
doesn't mind since I'm not an ANT user. Maybe in the future if we get other
Royale things with more priority done, we could introduce our own
sass-flavor compilation (something like ROCSS! ;)), that could give us the
same SASS does plus the ability to combine with AS3/MXML substitutions.

Final words, I'm thinking, as compiler, and structural problems will be
solved to make the following themes based of Jewel structure of html and
css rule selectors:

- Jewel (this is where I'm now and will set the foundation of names and all
that is need for each component, then we can have maybe 6 to 12 colors,
and/or combinations, to make this without SASS, I think is not possible
since means to automatically generate those final css and combinations, and
think about change only one attribute, what means to change this in the
rest of css. Doing this manually would make people spend hours)

-Material (this will have the same look as google material, and again, I
must create the different flavors of colors, again sass is involved in
order to not kill myself in the intention ;)

-Semantic (same as before replicating semantic)

-Bootstrap (same as the other cases replicating bootstrap)

This would be a huge effort, and with many time involved, maybe I never
could end this alone and can depend on how Royale be adopted in the
folowing months years. But this could make us to be very attractive since
people can change between different looks easily. This as well has a
consideration to, there are many components in that sets that are not in
royale, and maybe will never come, and I think that's not important. I talk
about have a common factor and try to recreate the different controls that
are in only in royale. Maybe we can consider to add for example a Card or
Badge component if we consider util...don't know.

Thanks



2018-03-14 18:32 GMT+01:00 Alex Harui <[email protected]>:

> So in trying to get the JewelExample to work, I think I understand what
> Carlos is trying to do with the Jewel Theme.  I'm going to attempt to
> clear up some confusion and propose a plan.  Note that below I am not
> using actual file names for brevity and clarity.
>
> A Theme in Royale is the same as it was in Flex.  It can be a SWC with
> code and assets (and some CSS), or just a simple CSS file.  You can
> specify more than one theme to the compiler.
>
> The themes/JewelTheme is not set up properly right now.  It has both a
> red.css and blue.css file that are being included in the JewelTheme.swc.
> The compiler has been taught to include all css in a SWC in the final
> output.  Really, in the themes folder there should be a JewelBlue folder
> with just a jewel-blue.css file in it and a JewelRed folder with just a
> jewel-red.css file in it and a JewelTheme folder with only shared assets.
>
> In Ant, command-line, or IDEs, the user would specify both JewelTheme.swc
> and either jewel-blue.css or jewel-red.css as themes.  For Maven, it is
> not clear how to make a simple css file be a Maven artifact so for other
> CSS-only themes, so we still build a SWC with only the .css file in it.
> See the basic.css in themes.
>
> IMO, that’s the Royale way for choosing your "primary" color of the theme
> at compile-time.  I think there may be customers who already know this and
> will expect it to work.  I don't see the need to develop some other way
> like additional compiler options and substitutions.
>
> If someone like Carlos wants to use SASS to generate the jewel-red.css and
> jewel-blue.css, I guess that's ok as long as that isn't part of the build
> such that every developer and patcher needs to install SASS.  We can call
> the "final" css files that are committed to the repo the source, IMO.
>
> Thoughts?
> -Alex
>
>


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

Reply via email to