royale-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carlos Rovira <carlosrov...@apache.org>
Subject Re: How can we pass colors to a CSS?
Date Fri, 09 Mar 2018 12:19:45 GMT
Hi Piotr,

2018-03-09 12:40 GMT+01:00 Piotr Zarzycki <piotrzarzycki21@gmail.com>:

> Carlos,
>
> I see following two things:
>
> 1) There is something in css which breaks build and you cannot uses,
> because compiler have some issue with it - yes?
>

sometimes is breaking the build, others not output what I write in css (for
example adding like "Unexpected value found" or something like that, don't
remember the exact wording)



> 2) You would like to add user possibility to change components easily -
> Your solution is SASS, because #1.
>
>
I want the user can use a theme with the colors he/she want to use
With SASS I can put the colors in a variables and the user can change it.
Or the next thing to look for are "palettes" that is something like MDL
does.
In this way user change colors or palettes and then use SASS to get final
CSS.
This process can be separate from the rest of royale, like the process to
make a PNG
since user can use the one we provide, or create another with Photoshop,
Sketch, Affinity...



> Am I understand in general correctly this thread ?
>
>
This thread should have priorities. As I see are:

1) Need to solve various problems with royale compiler processing of CSS
(gradients, alphas,...)

this is crucial since the rest of points depends on this.

2) How we can make users introduce a config via ANT or MAVEN to choose what
colors they want in final app

in this point I propose that user introduces properties for colors in ANT
or MAVEN and then the compiler retrieves that when process CSS to make
string substitution

3) What we can improve to make theme development more easier.

in this part is how near we can get to what SASS gives us, this can be of
less importance and since is more related at how the final CSS is created,
we can decide to separate from royale project (although, having this will
make our project to have even more sense, since as Om said, nobody has a
tool that makes what SASS does and even integrates with the code , in this
case AS3/MXML).

For point 3 I have SASS *separated* maven workflow, that doesn't need to be
part of the rest of royale libs and themes. I use this for convenience to
develop Jewel more easy and quick.

One final thought. We are a front end technology. Front-end relies heavily
in visuals. It seems in royale community, there's no much preoccupation in
this part. I think I'm alone with this since the rest of contributors are
more balanced towards framework code, compiler,...but not on UX (styles,
visuals, colors, animations...). I want to transmit here that all this is
very important since front end developers choose in part with his "eyes",
and then see other things. What I'm trying to contribute is fix the visual
part so people coming, can see "hey! this looks good!, lets see what's
behind..." and then we love the rest of the technology.
There's other kind of users that only needs an easy dev tool to make an
app, and they don't care if it looks good or not, while it works. My
thinking is that nowadays this kind of user are very few compared with the
other one.
I don't care to be the only one centered in visuals...it's ok for me, but I
want to remark the importance of this in the overall target we all pursue
and that I need some help in the parts where I can't reach (compiler
mainly, infrastructure,...)

Hope that clears this more

Carlos




> Thanks, Piotr
>
>
> 2018-03-09 12:28 GMT+01:00 Carlos Rovira <carlosrovira@apache.org>:
>
> > Hi Alex,
> >
> > 2018-03-08 23:06 GMT+01:00 Alex Harui <aharui@adobe.com.invalid>:
> >
> > > Hi Carlos,
> > >
> > > I don't doubt that SASS is powerful and useful, otherwise it wouldn't
> be
> > > popular.  What I am asking you to consider is that every decision you
> > make
> > > affects a lot of people and we only have a relatively small team.
> >
> >
> > Maybe you missed what I wrote at the beginning of this discussion. Use
> SASS
> > doesn't means anything for the rest of the project.
> > Let's compare with a PSD vs an img. Imagine I author a PSD to create a
> > button image background. Then I can put only the final PNG
> > in our framework to use it by a css and optionaly put the PSD I used to
> > author the final PNG in some source folder so people can use it.
> >
> > This is the same. SASS is the PSD and CSS is the PNG. The important thing
> > here's that I'm using SASS to be more productive,
> > and I'm producing a final "defaults.css". I can remove all SASS files and
> > configurations and work it on my own, but I think people would want it
> > In the other hand, people that don't want to use are not obligated, since
> > they can use the final "defaults.css" as its template to create his own
> > theme.
> > For me is just a matter of convenience since I can code the visuals in a
> > more organized way, just like I were coding AS3 vs JS. We use AS3 and not
> > CSS for the same reason people use SASS over CSS. It's more easy, can
> catch
> > errors, and you are more safe of what you're doing.
> >
> >
> >
> > >   So the
> > > first question I have is what is there about the current Royale feature
> > > set that makes it truly impossible or impractical to implement a
> > CSS-based
> > > theme and generate flavors of it with other CSS files?  If you push for
> > > SASS that means we have to impact all of our non-Maven users by asking
> > > them to integrate SASS somehow, or do more work on the compiler.  We
> > can't
> > > just make everybody use Maven and SASS.  That won't help us gain users
> > and
> > > successful migrators.
> > >
> >
> > I tell you in various emails this days. My problems are more in the post
> > processing of CSS by the royale compiler.
> > There's still sume rules that we don't allow, and that is limiting me
> since
> > I need to workaround.
> > I thought about solving it in the compiler, but after trying it, I
> continue
> > to be not able to solve it myself.
> >
> > In the next "step", the main problem is how to make colors configurable
> by
> > the final user.
> > The way other frameworks do is the following [1]. They have all
> > combinations of css colors in a final minified file.
> >
> > We can do this better by creating the palettes and creating the CSS on
> the
> > fly as people compile the Royale App.
> > The input will be 2-3 colors passed by ANT or Maven, the output for jewel
> > should be for example
> > "royale-jewel-${primary}-${secondary}-${accent}.min.css"
> > or if we create one with gradients then six vars ${primary1},
> ${primary2},
> > ${secondary1}, ${secondary2},...and so on
> >
> > But please, if we do this, it should not be planned as a few hacks here
> and
> > there. For me this should be part of something
> > like the targets rework you did some months ago. Where you need to
> > introduce it in all its complexity.
> >
> > This is the same, and what we get from this is a huge reward since we'll
> > have a great theme support that will people start to consider
> > Royale in real apps since we can provide them with a UI set that is
> usable
> > out of the box and match colors in their brands. They can choose how
> their
> > apps
> > looks from the beginning. Right now they can since we are providing basic
> > theme, or MDL, that makes them be stuck in the MDL namespace and what
> > things
> > works in that external UI set.
> >
> >
> > > That's why I want you to provide a concrete example or two of what you
> > > can't do with the current feature set.  And that doesn't mean by using
> > > MDL-style string substitutions or SASS-syntax.  In the end, you want to
> > > start with a set of CSS files and have the final CSS to look like
> > > something.  Royale has a way of doing that.  Why does that way not work
> > > for you?
> >
> >
> > the "partials" (for taking SASS naming) is working in royale, so we have
> > already one thing.
> > That's ok, we need more on this, but we need now, or do you want I cross
> my
> > arms and wait
> > for this to be implemented? what should I do? I need to focus on Sketch,
> on
> > prototyping, on design, on coding visuals
> > that fills my time each day on Royale. I can't do much creating this
> > features in royale compiler, since I read that code and don't know what
> to
> > do
> > even with your Kindly explanations what I thank you for providing me,
> since
> > is time you're investing for me.
> >
> >
> > > Sure there might be better ways, like all of the CSS features
> > > you listed below, but why do our themes need to use them?  Also
> consider
> > > that the more advanced CSS you use, the more work there will be to
> create
> > > a SWF equivalent.
> > >
> >
> > The final css is the same you will make by hand, so if SVGs are not
> > supported in SWF, this will no make a difference.
> > If linear gradients are not supported as well, again is the same...again
> > think in the PSD/PNG paralellims with SASS/CSS,
> > if SWF was not supporting PNG, the problem will not be that I author it
> > with Photoshop, is that we need Royale to make
> > it happen (support PNG in SWF)
> >
> >
> > >
> > > I think it will help the community more to understand the trade-offs
> and
> > > avoid using the latest, coolest thing so we don't have to expend as
> much
> > > energy getting it to work for non-Maven users.
> > >
> > >
> > We the things I'm doing, you don't need to wire SASS in ANT to see my
> work.
> > As I'm uploading generated defaults.css, you have the final css file,
> > ant a ANT build will retrieve this as in the rest of projects.
> >
> > Hope this clarifies all this more and we could go to the real target that
> > is getting a better visuals in a UI set that I'm sure will
> > provide us more engagement for people out there.
> >
> > Thanks
> > Carlos
> >
> >
> > > Thanks,
> > > -Alex
> >
> >
> >  [1] https://cdnjs.com/libraries/material-design-lite
> >
>
>
>
> --
>
> 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