Introducing Cossa, a GTK+ theme previewer for gedit

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.

11 Responses to “Introducing Cossa, a GTK+ theme previewer for gedit”

  1. 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 :)

  2. carlosg says:

    @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.

  3. nacho says:

    Awesome! glad to see that you made this with gedit. Lemme know if you need any help or something ;)

  4. carlosg says:

    @nacho: doing a gedit plugin was a great experience, gedit is the perfect place to have something fully integrated indeed :)

  5. nacho says:

    btw, I’m making some fixes on it, hope you don’t care ;)

  6. nacho says:

    ah! another cool feature would be to add some css autocompletion

  7. Benjamin Otte says:

    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 and a demo is at
    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. :))

  8. carlosg says:

    @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 :)

  9. […] ha preparato un video per dimostrare il funzionamento di Cossa su gEdit: è in formato WebM e non sembra esistere una versione su YouTube, ecc. quindi […]

  10. 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….

  11. John Stowers says:

    I filed this as an enhancement request against glade, it seems sensible to merge the standalone cossa previewer into the glads ‘preview seperately’ functionality