I have always been less than pleased with the way my blog looks, especially relating to the code snippets, but honestly changing the template hasn’t been that high on my priority list. I started writing a new blog today and decided to start using github gists instead of looking for a better syntax highlighter plugin for wordpress. The gists always look slick and handle just about every language syntax out there. But I have been liking the rounded box look more and more recently… and the gists are plain old rectangle boxes. So I decided to spruce up the gists a bit with CSS. When you create a gist on github, they give you a javascript snippet that will embed the gist into your website. So I pasted that in my blog post, looked at the preview and using Chrome’s built in developer tools I was able to see that the snippet simply adds elements to the DOM and pops in a CSS file. It is easy to override the default styles of the gist. Note that it is important that you use “!important” in each CSS attribute, since the gist stylesheet will be loaded after your sites stylesheet, giving it priority over your styles, unless you use the “!important”. Here is what I added to my stylesheet to make it a nice looking rounded box:
Enjoy!



