django + less, updated

In a previous post, I described how I configured the hyperkitty django project to use LESS. Briefly, my steps were: - install django-compressor, django-less, nodejs, npm, and lessc - update settings.py with configuration settings for django-compressor and django-less - restart webserver However, it turns out some of those steps are a bit outdated. First, PyPI says that django-less is not maintained and suggests using django-static-precompiler instead. Second, while LESS suggests that the easiest way to install the compiler is via npm, it is just as easy to install the LESS compiler via nodejs-less.…Read more …

django + less setup

While working on the front-end for hyperkitty, I was running into a lot of repetitive css. Now, I don't mind being a bit quick and dirty just to get things working quickly, but for long-term maintanance I thought it would be better to look into some stylesheet languages. Since hyperkitty is using Bootstrap, I naturally looked towards LESS. LESS has features like variables, extension, and nested rules, which makes CSS stylesheets look much more readable (and will hopefully mean it'll be easier to maintain moving forward). To get LESS working with hyperkitty's development…Read more …

spacing problems with embedded gists

Just installed the 'Embed GitHub Gist' plugin to Wordpress and while it makes embedding gists super easy, I found out that its CSS doesn't mesh well with the theme I'm using on this site. What ended up happening is that the line numbers were spaced out more than the code, so it made it look like there was a bunch of empty white space at the end of the code. To resolve this, you just have to add a line to your theme's CSS file (because the plugin's CSS is dynamically generated): .gist…Read more …

newbie compile error: @import and semicolons

In case others are encountering this error, it took me awhile to figure this out (but only because I was learning as I go and knew nothing before I started playing around). I'm using a SMACSS template in my Middleman setup. In my styles.css.scss, I wanted to do several @import, since I had already gone ahead and created modular CSS files (in an attempt to follow SMACSS). For newbies like me, please note that When using multiple @import's, you need to have a semi-colon after each @import line, or else you'll see errors…Read more …