You Got A Question? Ask    GNOME Community!

The Day That GNOME Made Me Hate Sass!

First of, theming IS IMPORTANT. It is not accident that Apple dedicated lots of time on it, at their Yosemite presentation. It is not accident that Google has theming as first priority in their settings. I bet, GNOME will refer their fresh (& really good) Adwaita extensively in their 3.14 release notes.

GNOME theoretically supports custom themes, but in practice they don’t do so well. They do pretty bad actually. Ironically there are top GNOME developers that they really want to offer ways for making theme authors life easier. Why isn’t happening? I would say that is a matter of priorities. To be totally fair thought, there is the GTK Inspector project that is an awesome tool for making themes.

For GNOME and GTK+ 3.14 there are 3 major changes considering the default theme

  1. Adwaita is ported to Sass, with SCSS syntax
  2. Adwaita is now part of LibGTK
  3. Applications will ship their own custom stylesheets

These changes, apart the last one perhaps, don’t really have a significant impact in the way we create themes. However when we are going to create a new theme it is more likely (99,99%) to start building it over the existing one, which is written in Sass.

Sass is a powerful CSS pre-processor that supports inheritance, mixins, complex variable lists, functions and much more. The point for using such pre-processors is to reduce the code and make it easier readable. So yes Sass is cool! What isn’t cool about Sass is that is very Ruby specific.

Today I spent 4 hours trying to make something that I thought it was really simple. I started writing a Brackets extension that it would compile and install a clean Adwaita theme. So everyone could easily get a blank theme, start hacking it, testing it and sharing it.

[caption id="attachment_27207" align="aligncenter" width="640"]brackets-sass An un-supported @each directive[/caption]

4 hours later I ended up writing this post, with nothing of the above happened. Why?

Because Node-Sass (C/C++ libsass implementation) isn’t supporting features that Adwaita Sass (v3.3+) is using and I only found it out way later! My next choice was to port the theme in Stylus, but that won’t work either, because the automate porting (Sass->CSS->Stylus) will produce very bad files that need manual editing.

You may ask why just don’t use Ruby’s Sass compiler? I don’t mind the slower performance, but why should people install Ruby Gems for making a theme in GNOME? There are dozens of Node applications for Linux, but 0 in Ruby. So why not Stylus that has more or less the same capabilities with Sass and it is more Linux Desktop friendly, or more popular if you prefer.

I do like Sass, it is a step forward in GNOME Theme developing, but today it was the day that I hated it! ..and obviously I will complete this task by using Sass Gem as dependency.. Pff..

  We can't watch comments unless G+ provides an API or if you send a notification, e.g +World Of Gnome
     Sometimes is better to place your questions on GNOME Community