Rob Straudinger recently added border-image support to his css markup-powered GTK+ Engine. This allows you to create really fancy buttons and other cool stuff in a rather simple way. Check out John Resig’s post about border-image implementation in Firefox for some cool demos of what you can do with this.
Back at GUADEC in Birmingham, when Garrett proposed using css-markup for widget themes, I thought it sounded a bit too cracky to be doable. Rob’s recent work, however, looks really sweet and since every designer and his mother out there knows css, this is a great way to lower the barriers of theme creation.
Rob is in great need of designers to test these things out in the wild though, so if you’re a designer with css knowledge who always wanted to create widget themes, don’t hesitate to check it out from svn and give it a shot.
svn checkout http://svn.gnome.org/svn/gtk-css-engine/trunk gtk-css-engine
You can find out more about the upcoming 0.3 release in the GNOME Theming blog.
Before anyone asks, the ccss library is available on freedesktop — http://anongit.freedesktop.org/git/ccss.git
[...] [...]
Hasn’t the pixmap theme supported this feature since forever?
Alexander: not with css syntax, right?
Andreas: No, not with css syntax. But the feature is exactly the same.
Alexander: the border-image feature is not worth mentioning on its own (the whole idea of CSS toolkit theming isn’t really). It’s more that this was pretty much the final stopgap preventing real-world themes with the CSS engine.
[...] What I don’t see is, how it will dramatically lower the barrier to entry for GNOME theming, or even lead to better themes. When you look at the web, spectacular designs are (by and large) not spectacular because of CSS attributes, but because CSS allowed web designers to precisely position… pixmap images. Positioning, however, is the least of our problems in Gtk theming (or rather, we don’t have a choice in the first place). CSS attributes alone won’t help us create breath-taking designs, so by and large it will be things like the border-image attribute (a standard feature of the pixmap engines), which will drive most visually exciting designs. I believe this is a good thing and the right way to go, but the important part here is not the CSS syntax in the GtkRC, but that we get back to embracing image-based themes. Arguably, a more stream-lined syntax would even be easier to deal with for artists, even if they have previous experience with CSS. Just because many people know CSS, doesn’t mean that artists and designers will suddenly enjoy writing code. In the ideal case, they should never have to touch the GtkRC in the first place. [...]
[...] Andreas’ recent post initiated some discussion about this project’s merits [1, 2], so it might be helpful to spell out some factoids. [...]