Hi Carlos,

I looked around and don't see any support for multiple CSS files in the
compiler.  I could add it, but I'd rather spend my time on other things.
I'm unclear what the return on investment is.

If you do decide to change the compiler, it appears that CSS has an
@import statement, so I would recommend starting by trying to implement
support for that.  An alternative approach would be to have the compiler
try to find all .css files in a SWC.  Right now it only looks for
defaults.css.

And, of course, you could probably find a Maven and Ant way of
concatenating all of the files during the build.

Remember that Royale lets you extend the set of Type Selectors so you can
(and should) have selectors with the same name as the component.  And then
I think it is relatively easy to find a component's selector in the
defaults.css or guess what selector name to use in your fx:Styel block.

I don't know if your work will end up generating class selectors as well
as type selectors, but if it does, having one file might make it easier to
avoid collisions in class selector names.

Good luck,
-Alex

On 2/13/18, 3:20 AM, "carlos.rov...@gmail.com on behalf of Carlos Rovira"
<carlos.rov...@gmail.com on behalf of carlosrov...@apache.org> wrote:

>Hi,
>
>I'm organizing CSS files in Vivid (new ui set) - VividBlueTheme (first
>theme) - VividExample (example to show all working)
>
>I want to develop each component look-and-feel and style in a single file
>in the theme project:
>
>default.css (this could hold global styling like body, headers, background
>color, and more)
>TextField.css (all css to make a TextField be represented in a particular
>way)
>Button.css
>Slider.css
>...
>
>in my theme pom I have:
>
><includeFiles>
><include-file>
><name>defaults.css</name>
><path>../src/main/resources/defaults.css</path>
></include-file>
><include-file>
><name>TextField.css</name>
><path>../src/main/resources/TextField.css</path>
></include-file>
></includeFiles>
>
>and I check the resulting VividBlueTheme.swc and has default.css and
>TextField.css
>
>* First question here is: Can I collapse all css content in multiple files
>in a single .css (i.e: defaults.css or themename.css)?
>
>Then in vivid example how CSS in theme projects are referenced? I see
>"defaults.css" is begin applied, but "TextField.css" is not
>
>* Second question how to apply a included .css file to be used in example
>
>Notice that if we get all css in one single file we don't need the second
>part.
>
>Hope you could help me on this in order to continue progress with this
>effort
>
>thanks
>
>
>
>
>-- 
>Carlos Rovira
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2
>Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C02c48a3da9454fde800508d5
>72d3d2d4%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636541176461226993&s
>data=BVn%2Fx1e8QtZ4%2F8evAsM2VZsrHNapak2itoeahhWpnRY%3D&reserved=0

Reply via email to