royale-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carlos Rovira <carlosrov...@apache.org>
Subject Re: Initial sample theme based on colors
Date Sat, 10 Mar 2018 10:17:57 GMT
2018-03-10 10:28 GMT+01:00 Piotr Zarzycki <piotrzarzycki21@gmail.com>:

> So are you saying that in order to change something you will need to point
> those files through fx:Style or Maven/Ant compiler options ?
>
>
Since Royale is taking the included CSS files in theme and *processing* to
output App.css all styles that we put on CSSs and be included in theme will
be processed,
ergo, we'll have lots of unused styles (imagine we create 30 different
color schemes, you'll end with 30 styles per rule duplicated, that's huge!)

So we need to think how to solve this.

One option is we tell the compiler what color scheme we want when compile
the App, this will work for *fixed* themes.
If we want *runtime* themes, we need to make our final App get all css
files to load at run time (so if we have 30 themes, we'll have 30 css files
and you can put a logic in your app to load one of them, for example a
dropdown to select.



> Here is my thoughts:
> - No you should create visual appearance of component through sketch - why
> not. It helps you achieve what you really need.
>

ok Piotr, but that only was a rhetoric question to explain why SASS is only
a tool for a purpose, get a final CSS. And since there will be lots of
components, rules, colors, palettes and themes, we should not do this at
hand...imagine to change a color, and update ir manually, you can die in
the process ;)


> - You have created Theme - theme saying how components should looks like
> yes ?
>

The example has two css files (red and blue) that shows a sneak peak of how
things can be. Is very limited, but maybe better at this stage to help you
all to see where are the building pieces (variables, mixins, components...)
and how this relates to jewel components. I'm still figuring all of this
since as I go with other components plans are valid for the rest, and avoid
start changing in lots of files.


>
> User is taking Jewel -> using your Theme.swc. - If he want to change some
> default appearance - he should create his own theme - Am I right ?
>

If the theme.swc is not what he wants, he can make the changes he need. As
in old flex, people can create it's own themes like in the old days.


>
> Your idea is adding more options, by SASS ?
>

SASS seems very simple. It's just few things, but powerful. I think I put
almost all the things in place in terms of SASS features (variables,
partials, mixins, extends/inheritance,...), maybe I could need something
more.

For example, using functions like "darken" or "lighten" I can provide only
one color and play with this functions to get variants of that color. We
can have in our set a variable "gradient" (true/false) to change the look
from solid to gradient. I'll play with this as soon Alex fix that in
compiler (since in the end all goes through our pipeline)




>
> 2018-03-10 9:43 GMT+01:00 Carlos Rovira <carlosrovira@apache.org>:
>
> > Hi Piotr,
> >
> > SASS is to help me develop final CSS. Did you read about my comparison
> with
> > Photoshop/PSD - PNG?
> > Should I create a PNG without a tool like Sketch to get final PNG?
> > SASS only creates the final CSS (defaults.css or other you'll use to use)
> > I'll love to have something like SASS in Royale (it could be called ROCSS
> > ;)), but this is not yet. In the mean while
> > what I see is that SASS let me write better organized CSS.
> >
> > About passing variables through MAVEN or ANT, this is optional. Since we
> > are creating for this example two final css:
> >
> > royale-jewel-blue.css
> > royale-jewel-red.css
> >
> > You can use one or another at Runtime. But to do this, you'll need to
> avoid
> > Royale CSS processing, since those CSSs are processed
> > and added to App.css. But you want to maintain those files and reference
> it
> > through at runtime with fx:Style tag or runtime css loading.
> >
> > We should support both methods.
> >
> > 1) people that only wants to use only one theme and include just that in
> > their bundle
> > 2) people that wants all styles and let the user pick one at runtime.
> >
> >
> >
> > 2018-03-10 9:03 GMT+01:00 Piotr Zarzycki <piotrzarzycki21@gmail.com>:
> >
> > > Does it mean that if he fix it you will be able to drop Sass usage?
> > >
> > > I actually don't like idea to pass some variables through Maven, Ant.
> > >
> > > If use write large app and would like to dynamically change colors he
> > will
> > > need to pass many of them - yes?
> > >
> > > Piotr
> > >
> > > On Sat, Mar 10, 2018, 08:23 Carlos Rovira <carlosrovira@apache.org>
> > wrote:
> > >
> > > > Hi Piotr,
> > > >
> > > > this thread is about a *working* example :)
> > > > to read about the fails please check other threads where we talked
> > about,
> > > > or go directly to issues #25 and #26 where you can see how to
> reproduce
> > > > inserting just one single line in your css. But maybe that not
> deserve
> > > you
> > > > put time on it since Alex said he'll be fixing it
> > > >
> > > > thanks
> > > >
> > > > 2018-03-10 0:39 GMT+01:00 Piotr Zarzycki <piotrzarzycki21@gmail.com
> >:
> > > >
> > > > >
> > > > > > Apart of your points 5, 6 where you have said that you need
help
> -
> > I
> > > > > don't
> > > > > > see example where something is not working. You were talking
> about
> > > some
> > > > > > gradient things etc. Please proved some separate examples where
> you
> > > > have
> > > > > > tried to achieve and compiler failed.
> > > > >
> > > >
> > > >
> > > > --
> > > > Carlos Rovira
> > > > http://about.me/carlosrovira
> > > >
> > >
> >
> >
> >
> > --
> > Carlos Rovira
> > http://about.me/carlosrovira
> >
>
>
>
> --
>
> Piotr Zarzycki
>
> Patreon: *https://www.patreon.com/piotrzarzycki
> <https://www.patreon.com/piotrzarzycki>*
>



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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message