Mikael's blog

A developers seventh time trying to maintain a blog

Tag #css

New Drapes | April 22, 2013 at 21:32

I got tired of the old dark green design. It was too murky and spring is in the air, so I redesigned the site to be lighter and more "spring-y". ## Old friends ````js var awesome = "Inconsolata is back!"; ```` `Inconsolata` is back as the source code font and `Open Sans` makes up the majority of the text on the blog now with the exception of headers which are set in `Racing Sans One`. All-in-all, I'm happier. And hopefully this can trigger my implementation of multiple pictures per post since I need that to report on my robot project progress. Summer is coming and summer means sun, and sun means solar power which in turn means that I need to speed things up if I want this project done before the (OMG spoiler alert!) new baby in the end of July.

LESS Is More, More Or Less | March 8, 2012 at 23:05

A while back I read a blog post somewhere about how the [LESS](http://lesscss.org/) parser/compiler had been remade in Javascript. "Well awesome", I thought to myself as I had been wanting some more flexibility in CSS but had been to stubborn/proud to install the SASS compiler since it's written in Ruby. Needles to say, I wanted to incorporate it in my blog as soon as possible but I've not had the time to actually do it until now. #### LESS you say? LESS (like SASS) is a CSS derived language that adds a whole lot of long needed features to CSS to ease maintenance of large style sheets. It compiles into regular CSS markup either in realtime (through their nifty Javascript implementation in the browser) or, as in my case, as a bootstrapping task when I start my blog. For now, it's tacked

Automatic Minification and Bundling with node.js | November 29, 2011 at 21:51

Scott Guthrie recently wrote about the new [minification and bundling](http://weblogs.asp.net/scottgu/archive/2011/11/27/new-bundling-and-minification-support-asp-net-4-5-series.aspx) process that has been built for ASP.Net 4.5. I read his blog post, liked what I read and then I though of doing the same thing for my blog. I've been looking at minification programs for a while but I've put it off so far because I didn't want to add another step to my manual deployment process. Now I'm thinking I don't have to have another step. I could do it "automagically". ## The BundleController ````js /***************************************** * Bundle Controller ***************************************** * Author: mikael.lofjard@gmail.com * Website: http://lofjard.se * License: MIT Licen

Somewhat backwards compatible | November 14, 2011 at 16:55

I got the chance to see my blog through the eyes of Internet Explorer 8 today, and boy was that something to behold. There was no styling what so ever. It looked like the internet pre 1995. This site uses HTML5 and CSS3 and that is fine for most modern web browsers. Even those that has no support for HTML5 renders ok, mostly due to the fact that they ignore the tags they dont recognize and just renders them as they would any `<div>`-tag. But not dear Internet Explorer. Internet Explorer < 9 just ignores the tags and doesn't style what it doesn't know. Awesome! Good thing then that a couple of guys realized that you could trick IE into rendering unknown tags by creating them with javascript. ````js document.createElement("mysuperspecialtag"); ```` The above piece of javascript is all th

Trying to fix SyntaxHighlighter on mobile browsers | November 4, 2011 at 10:44

I recently incorporated the [SyntaxHighlighter](http://alexgorbatchev.com/SyntaxHighlighter/) by Alex Gorbatchev so that I can easily show code examples in a nice way. The default configuration seems to have a few quirks when it comes to working on mobile devices. Not all of them are SyntaxHighlighters fault to be fair, but here's some of the things I've had to deel with. #### Broken font fallback stack The default font fallback stack in SyntaxHighlighter looks like this: ````css font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; ```` Consolas is the new pretty font used in Visual Studio 2010 and it is my personal favourite for displaying source code, but it only exists on Windows Vista+. Well that shouldn't be a problem since there is

Responsive Web Design | November 3, 2011 at 21:16

Responsive web design is the new rage in HTML. As much as I dislike buzzwords, this one is actually something worth thinking about. [Scott Hanselman](http://www.hanselman.com/blog/LearningAboutProgressiveEnhancementSupportingMobileBrowsersWithCSS3MediaQueries.aspx) wrote a blog post on the subject a while back and [James Fuller](http://www.jblotus.com/2011/06/21/protect-your-career-with-these-5-web-development-technologies/) has it at #5 on his top 5 list of things you need to learn right now. If you don't have a smartphone of your own to try your site out on you can make use of Google's [GoMo](http://www.howtogomo.com/en/#test-your-site) project which can render what your site will look like on an Android phone. As of this post I've done my share of responsive web design for this site

Sorry, sharing is not available as a feature in your browser.

You can share the link to the page if you want!

URL