Earlier today I’ve pushed gedit-cossa, a plugin for gedit to help writing CSS for GTK+ themes, it is able to display a number of samples, loaded from GtkBuilder files.
Here’s a video demonstrating how it works:
Cossa is still in pretty early development stages, immediate plans include:
- Hooking CSS parsing errors to the gedit view
- Adding a lot more samples, these should range from simple examples (basic widgets in different states) to complex (basic main window sample, preferences dialogs, …)
Anyone is welcome to help, specially in the second point, as it is fairly straightforward to add new samples.
A stand-alone previewer binary with inotify support would probably be more than welcome for people that don’t use gedit as their primary text editor. And it would also make it easier to test 🙂
@bastien: Hey, not a bad idea at all, the only downside is that CSS parsing error integration wouldn’t be that tight. I’m an emacs user myself, I on one hand didn’t want to do the text editor “burden”, and on the other initially thought about designers, who aren’t that likely to have such strong preferences wrt text editor :), but that’d be pretty handy.
Awesome! glad to see that you made this with gedit. Lemme know if you need any help or something 😉
@nacho: doing a gedit plugin was a great experience, gedit is the perfect place to have something fully integrated indeed 🙂
btw, I’m making some fixes on it, hope you don’t care 😉
ah! another cool feature would be to add some css autocompletion
w00t, rockage!
This definitely has some overlap with the live CSS editor I just wrote to test nth-child support with. Currently that’s residing at http://git.gnome.org/browse/gtk+/commit/?h=nth-child&id=303884715f61408692f22f62fe247d05ba829c83 and a demo is at http://people.freedesktop.org/~company/stuff/css-fun.webm
It definitely is the place to look for when hooking up error parsing.
Also, I’d go with live-editing. It feels a lot more awesome and responsive than having to click “reload”. Plus, it just looks cute, see the video above at 3:13. (The only reason I could find for not going live-editing would be that it takes too long, but as you’re just styling a small widget hierarchy, that shouldn’t be a problem. If it turns out to be, I’ll fix it. :))
@nacho: just go ahead, css autocompletion would be awesome indeed
@benjamin: Yeah, should have a look at doing real live previewing, I also missed a way to attach a provider to a whole hierarchy, I’d like to work to have something in place for 3.2, your builder file will be definitely useful to keep track of performance there 🙂
That’s really amazing! I’ve been theming GTK3 for my netbook, with cossa I will be able to polish it faster and publish the theme….
I filed this as an enhancement request against glade, it seems sensible to merge the standalone cossa previewer into the glads ‘preview seperately’ functionality
https://bugzilla.gnome.org/show_bug.cgi?id=651765