Make theme authors’s life easier – Support margin property in CSS

The past week I tried to give the GTK+ popover design to popovers in gnome-shell.

That meant to add margin to the items. But, I noticed gnome-shell doesn’t allow that. So I had to do a lot of code refactoring just to provide some margin to those actors. Indeed it was not a good solution.

Yesterday, I read that some important theme authors ( https://plus.google.com/101681698460010159459/posts/FTed9FNxtiF ) felt like gnome-shell lack support of the necessary css for them, tough they kindly understand why. Some authors solved the margin issue in their extensions of gnome-shell. At the end we had some authors that apply a solution “downstream” while upstream is waiting for that functionality.

So I really encourage those people that, if you found something that could be added as a functionality, make a patch for upstream instead of creating their own solution that no one can benefit of. All of us will appreciate that! =)

Most of the times, if something is ugly, if some functionality is missing, etc. it’s because we need patches, not because we don’t want them. But I understand that feeling.

As always, I saw a challenge there. So I implemented CSS margin support for gnome-shell!

https://bugzilla.gnome.org/show_bug.cgi?id=728437

Now, all the code I did for matching GTK popovers design in the past week that was 180 lines of code, now is reduced to just:

.popup-menu-item {
spacing: 12px;
margin: 0px 10px;
border-radius: 4px;
}

I would say, it’s looks much better!

And the result:

Image

 

I hope theme authors and designers are a little more happy now =)

Important to say that this work wouldn’t be possible without Florian Müllner helping me very close and Emanuelle Bassi that is always there for answering.

 

Advertisements

10 thoughts on “Make theme authors’s life easier – Support margin property in CSS

  1. Thanks for blogging about this – it is really nice to know that someone is trying to make the life easier for everyone with regards to theming. 🙂

    1. You’re welcome =)
      The thing is that, to make gnome-shell rocks usually gnome devs have to spend time doing really important things.
      And really, I hope they continue in that way to make gnome-shell what it needs to be =)
      So normally things like that are not implemented until its strictly necessary, or a contributor make a patch.

    1. Thanks!
      Since it is a API addition it’s only possible on unstable releases, so it will be available for 3.13 series, and therefore for 3.14. No for 3.12 series.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s