Is it possible to use more CSSes in the same Codename One project?
Use case 1: I want different styles in different parts of the app or I want to replace at all the current styling.
Use case 2: I want that the current style is derived from several CSSes, like in a web page
There is currently no support for that in the CSS implementation that's integrated into the plugin. The old implementation allowed that but we simplified some things so the conversion process will be fluid.
Since multiple resource files and layered themes are supported internally by Codename One this should probably be easy to accomplish. I'm guessing something like this in the build.xml
might work:
<target name="-cn1-compile-css" if="codename1.cssTheme">
<java jar="${user.home}/.codenameone/designer_1.jar" failonerror="true">
<jvmarg value="-Dcli=true"/>
<arg value="-css"/>
<arg file="css/theme.css"/>
<arg file="src/theme.res"/>
</java>
<java jar="${user.home}/.codenameone/designer_1.jar" failonerror="true">
<jvmarg value="-Dcli=true"/>
<arg value="-css"/>
<arg file="css/second-theme.css"/>
<arg file="src/second-theme.res"/>
</java>
</target>
</project>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With