Open jiwalker-usgs opened 8 years ago
Using Less could really clean up the CSS process - see http://winless.org/online-less-compiler to understand how powerful Less is. It reduces redundancy by allowing for variables and mixins, offers basic arithmetic and color-modifying functions, can organize code into namespaces, provides string templating, and more.
Despite the benefits, this issue has been stagnant a long time because:
@mwernimont cautions that we should "know what minefield we are walking into" before really gunning for this. But he would like to be able to use Less, on a "would be nice" level or maybe a little higher.
I'd like to see another attempt at this. I think we could manage the CSS vs Less problem through PR reviews and good communication - plus, I think many vizmeisters would quickly learn to appreciate & embrace the Less approach. And even if we can't do instantaneous compilation on save, surely we could find a way to compile Less files from R on 3 platforms, with an if() switch to figure out which platform each developer is on. That compilation command could be run by the developer directly and repeatedly while they're editing, and could be part of the standard viz build process to ensure the CSS files are up to date when PRs are submitted. If we're willing to sacrifice some of the complete solution that was originally envisioned, I think this can be done.
We will want to move styling to less/sass/scss, so we should compile this as part of the build.