Hi Guillaume,
On 17 Sep 2015 at 18:59:22, Guillaume Louis-Marie Delhumeau
(gdelhumeau@xwiki.com(mailto:gdelhumeau@xwiki.com)) wrote:
Hello everyone.
The front-end world is evolving really fast, and it's very hard to pick the
good JavaScript framework, the good CSS preprocessor, or the good CSS
toolkit. It's so unpredictable that it has inspired a comic strip:
http://www.commitstrip.com/en/2015/09/16/how-to-choose-the-right-javascript…
:)
Last year, we have chosen to use Bootstrap for our new Flamingo Skin.
Quickly, I have discovered that we had to integrate a CSS preprocessor to
be able to customize it [1]. The natural choice was Less, since Bootstrap
and of lot themes of the web were using it.
Now, the situation have changed. Bootstrap 4.0 will be released soon [2].
It have been entirely rewritten and some retro-incompatibilities have been
made. But the most breaking change is that they don't use Less anymore, but
Sass.
By the past, they use a less-to-sass converter so they were able to propose
both versions of the framework. But now, I doubt the opposite converter
could be possible since Sass have more features than Less.
Worse, it seems that Sass is becoming more popular than Less [3].
Note: the current Bootstrap version, 3.x, will be maintained during one
year, so we have this time to adapt.
If we want to upgrade to Bootstrap 4, we will need to integrate the Sass
preprocessor. Fortunately, we can re-use a lot of the work that I've done
for Less (the cache mechanism, etc...) that I can modify to be more
generic. I don't have estimated the time it would take yet.
If we want to upgrade Flamingo to Bootstrap 4, it will create some css
breakage (and the ability to use LESS in SSX will be loose). And we will
have to convert our Less code to Sass.
We could also decide to keep Bootstrap 3.x in Flamingo and use Bootstrap 4
for our next skin.
Why couldn’t we use LESS in SSX since in the end it generates CSS?
Note that even SASS may not last very long (see this fun tweet:
https://twitter.com/mdo/status/591364406816079873?lang=en).
For example there’s postCSS now (and lots of others):
*
https://twitter.com/jeremychone/status/636570198510735360
*
https://github.com/postcss/postcss
* "PostCSS can do the same work as preprocessors like Sass, Less, and Stylus. But
PostCSS is modular, 3-30 times faster, and much more powerful."
* Some slides:
http://ai.github.io/about-postcss/en/
Our only real solution would be to be able to have XWiki work with several but I don’t
know how hard it is to convert the bootstrap CSS files.
See for example
https://github.com/OEvgeny/bootstrap-postcss
Since BS3 is pretty often used, I’m pretty sure people will develop converters from LESS
to SASS or others.
So I think it’s important that we wait a bit :) We should research the topic though.
Thanks
-Vincent