2014-05-28 17:07 GMT+02:00 [email protected] <[email protected]>: > Hi, > > +1 in general (we brainstormed about it together with Guillaume actually > ;)). > > Also, do you remove the end part of the CSS that’s not used after the LESS > compilation? (I think we should). >
No. The alternative is to not compile "style.less", but instead "style-simplified.less" that would only contains color-theme special classes. So in the standard style.less, there would be no pollution. > > Thanks > -Vincent > > On 26 May 2014 at 15:49:50, Guillaume Louis-Marie Delhumeau ( > [email protected](mailto:[email protected])) wrote: > > > Hi! > > > > The current color theme editor is designed for colibri, and does not look > > like flamingo does. We have several options here: > > - create a new color theme editor, especially for Flamingo > > - modify the current one to detect which skin is currenlty used, and > change > > the preview. > > > > The application will be splited in 2 sections: > > 1/ a live preview where you can set some variables (what we currenlty > have) > > 2/ a free textarea where the user can fill LESS code (for example, some > > code downloaded on bootswatch). > > > > But a lot of applications already use the color theme as it is, via the > > "colorThemeInit.vm" template. So we need a retro-compatibility: a color > > theme computed by LESS must be usable with old color themes. > > > > Concretly, we will map the old color theme variables to the bootstrap > ones, > > example: > > $theme.notificationSuccessColor = @brand-success > > > > But because of the section 2 (the free textarea), we are not able to know > > what will be the final value of a bootstrap variables without parsing the > > content of the textarea! > > > > What are the options we have: > > 1/ Implementing our own LESS parser/compiler in Java > > 2/ Trying to reuse the official LESS Parser through Rhino in a way that > we > > can get the computed variables > > 3/ Do not parse the input but the ouput: parse the CSS code to get the > > final values of the variables > > > > I'm for 3. > > > > The idea is to create some CSS classes like this: > > .colortheme-bordercolor{ > > color: @border-color; > > } > > > > which will be converted by LESS to: > > .colortheme-bordercolor{ > > color: #000000; > > } > > > > so we can parse it and know the value of $theme.bordercolor. It is quick, > > simple, but it pollutes the output CSS a little. > > > > WDYT? > > > > Thanks, > > Guillaume > > _______________________________________________ > devs mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/devs > _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

