Hi Carlos, Regarding rule precedence in with more than one theme: I'm pretty sure the compiler outputs rules in the order it loads them. If it doesn't, we could probably make it so. The only trick is in the order of loading when one theme is specified on the command line and another is specified in a config file. I think command-line would be last in the order.
I am hopeful I have explained the issues well enough that you can go refactor JewelTheme into multiple folders and get it all working in Maven. I just found this article [1] about using install-file to install single-file artifacts. Don't know about deploying single-file artifacts though. Maybe this will help [2]. So I would like to have you do the refactoring. Once you do that, and also adjust JewelTheme to build both SWF and JSRoyale targets, your ClassReference issue should go away. It wasn't clear to me that folks should be able to specify any two colors. I thought that MDL and even us in Royale would specify a set of color pairs that we know look good together. And for Royale, those could be just themes as .css files. Regarding supporting other things like Bootstrap, if the sub-trees in the components for Jewel are the same as the ones in Bootstrap, then Bootstrap should "just work". Ideally, Bootstrap support isn't critical to Royale and we would get noticed for other successes and Bootstrap fans would do the work of getting Royale to work with Bootstrap. I'm off to do other things. Hopefully you can get Jewel and JewelBlue (or even JewelBlueGreen) working in Maven in separate folders and finish up the Jewel theme. Thanks, -Alex [1] https://stackoverflow.com/questions/31807924/a-simple-way-to-create-a-singl e-file-artifact-using-maven [2] http://maven.apache.org/plugins/maven-deploy-plugin/deploy-file-mojo.html On 3/15/18, 2:51 AM, "[email protected] on behalf of Carlos Rovira" <[email protected] on behalf of [email protected]> wrote: >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 >https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2 >Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C3a0b7828f62b4a82a7ec08d5 >8a5a5efe%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636567043103456398&s >data=YiPRBIev2mWNmK3R329LekESsm4UMy%2F4RwFa8%2FuhsG0%3D&reserved=0
