[openstack-dev] [Horizon] RFC - Suggestion for switching from Less to Sass (Bootstrap 3 & Sass support)

Jaromir Coufal jcoufal at redhat.com
Wed Feb 5 16:32:54 UTC 2014


Dear Horizoners,

in last days there were couple of interesting discussions about updating 
to Bootstrap 3. In this e-mail, I would love to give a small summary and 
propose a solution for us.

As Bootstrap was heavily dependent on Less, when we got rid of node.js 
we started to use lesscpy. Unfortunately because of this change we were 
unable to update to Bootstrap 3. Fixing lesscpy looks problematic - 
there are issues with supporting all use-cases and even if we fix this 
in some time, we might challenge these issues again in the future.

There is great news for Bootstrap. It started to support Sass [0]. 
(Thanks Toshi and MaxV for highlighting this news!)

Thanks to this step forward, we might get out of our lesscpy issues by 
switching to Sass. I am very happy with this possible change, since Sass 
is more powerful than Less and we will be able to update our libraries 
without any constraints.

There are few downsides - we will need to change our Horizon Less files 
to Sass, but it shouldn't be very big deal as far as we discussed it 
with some Horizon folks. We can actually do it as a part of Bootstrap 
update [1] (or CSS files restructuring [2]).

Other concern will be with compilers. So far I've found 3 ways:
* rails dependency (how big problem would it be?)
* https://pypi.python.org/pypi/scss/0.7.1
* https://pypi.python.org/pypi/SassPython/0.2.1
* ... (other suggestions?)

Nice benefit of Sass is, that we can use advantage of Compass framework 
[3], which will save us a lot of energy when writing (not just 
cross-browser) stylesheets thanks to their mixins.

When we discussed on IRC with Horizoners, it looks like this is good way 
to go in order to move us forward. So I am here, bringing this 
suggestion up to whole community.

My proposal for Horizon is to *switch from Less to Sass*. Then we can 
unblock our already existing BPs, get Bootstrap updates and include 
Compass framework. I believe this is all doable in Icehouse timeframe if 
there are no problems with compilers.

Thoughts?

-- Jarda

[0] http://getbootstrap.com/getting-started/
[1] https://blueprints.launchpad.net/horizon/+spec/bootstrap-update
[2] https://blueprints.launchpad.net/horizon/+spec/css-breakdown
[3] http://compass-style.org/



More information about the OpenStack-dev mailing list