Lukewh's tumblr

RSS

(Source: threewordphrase)

Jonny Haynes: Some quick thoughts on LESS, SASS and other 'CSS Extenders'

OH MAH GAH, AH HAVE MORE!?

Indeed
After publishing my earlier post I had a short discussion with @jonathantweed, which helped remind me of another reason why I thought compiling was bad - multiple dev environments.
I’m sure there are ways around the problem, but in a rapid development situation it was quite an ask for all the devs to compile the css or have a compiler watching files in the background… Minor I know.

RE Jonnys post (included below)
Like Jonny I’m also a OOCSS advocate (though I do tend to bend the rules a little) and while I agree OOCSS comes close to mixing content and layout I find more holes in the LESS approach.

If Jonny had gone with the OOCSS approach he would have:
p {}
.red { color: #ff000; }
.font-16 { font-size: 16px; }
.black-fill { background-color: #000; }

The LESS example (if not compiled by Javascript - we both agree javascript compilation is less then ideal) would create:
p {
color: #ff0000;
font-size: 16px; 
background-color: #000;
}

All p’s would have this styling (though I don’t think Jonny really would add it to an element, it’s just an example), but that compilation just makes me think - why not write it like that in the first place? Combine those three OOCSS styles together into a larger more useful CSS Object? I know the variables and mixins of LESS can help you code it faster, but I’ll get onto that in a minute.

The way I may write it from the get go (to bring it closer with how I use OOCSS) would be:
.red-16-blackBack {
color: #ff0000;
font-size: 16px;
background-color: #000;
}

I think the CSS spec can learn from LESS’ use of variables, but for the time being I don’t have a problem with Find & Replace. I haven’t seen any evidence to suggest LESS makes your CSS files any smaller or efficient for the end user, it just gives the CSSer more to think about and keep track of. For example I, and my colleagues know that border-radius: 5px; will give us rounded corners of 5 pixels but unless we take time to set out some rules on naming etc. we might not know whether Dave set up @borderRadius5 .border-radius5, or .border-radius(5), ‘uh-oh he didn’t, I’ll set it up then’… ‘ooooh he called it .rounded-corners(5)’. I understand it’s a very minor point, but in the heat of a client battle when they want the top right hand corner of that specific div a little bit more curvaceous within the next minute, border-radius: ; does the trick every time… You don’t even have to compile it to push it live.

After all the ranting I do still think I’m waiting for the curtains to open so I can see LESS in the same light almost everyone else does, but every time I try to peak through, a net curtain provide a haze of doubt so I close the curtains and hit +f.

jonnyhaynes:

I got into a discussion with lukewh on Twitter about Less.css after I asked people’s thoughs on it.

Having done quite a bit of research over the last few days into Less.css and other ‘CSS extenders’ as Luke called them, I thought I’d add to the discussion …

I, like some of my colleagues we…

(Source: lukewh)

Some quick thoughts on LESS, SASS and other ‘CSS Extenders’

I recently started a conversation with Jonny Haynes on Twitter, responding to his question:

Asking again, not many replies yesterday. What are your thoughts on Less.css?http://lesscss.org/ #less #css #development #web #ask

Original Tweet

And 140 characters isn’t enough for me to say what I think, so here it is.

When I first discovered these extensions I thought the future was here. Dynamic CSS with variables and mixins etc. etc. - very useful for the big project I was working on at the time. However I was disappointed when I realised how much you had to do to *compile* these dynamic files into CSS before deploying. I didn’t, and don’t, understand why I had to add an extra layer of complication and computing to something that IMO can be solved by writing better* CSS?

Many argue these languages (let’s call them) make your development quicker, I don’t disagree with them, I can see the benefit. I however didn’t think the setting up of, and maintaining of, the compilers worth the time.

When Jonny diverted me to the LESS page I was pleasantly surprised to see a client-side compiler in the form of Javascript, on first thoughts (and response to Jonny) I thought this was a step forward, but on hindsight I think it’s *almost* a step backwards for two reasons:

  1. Reliance on Javascript
  2. Javascript file that’s probably bigger to load then the CSS file would be if you just wrote it all in boring old CSS

Plus I like to be able to jump onto any PC, open a text editor and do some mad CSS. There’s probably a lot more to say on the subject, and there’s probably a lot of holes in my rationale, but for now I’ll keep typing my CSS out like it’s 2009… Having new-age fun with a vintage feel! Maybe I just need to see the light?

* I use the term better loosely. 

ps. I feel the same with Javascript….

Holy Trinity Appeal For Your Old Poppies

Artist Martin Waters needs your help to create a drifting field of poppies through Holy Trinity Parish Church, Hull, during November Remembrance 2011.

If you can help please leave your poppies at

Hull City Libraries Collection Boxes

Kingston Art Gallery, 26-27, Humber Street, Hull

Holy Trinity Church, Hull, HU11RR

seldo:

This is genuinely Microsoft’s idea of a “streamlined”, “optimized” UI for Windows Explorer. They were so proud of it they wrote a blog post about it.
The post is a sort of masterpiece of crazy rationalization, but I think my favourite part may be this screenshot:

Here, they proudly overlay the UI with data from their research into how often various commands are used. They use this to show that “the commands that make up 84% of what users do in Explorer are now in one tab”. But the more important thing is that the remaining 50% of the bar is taken up by buttons that nobody will ever use, ever, even according to Microsoft’s own research. And yet somehow they remain smack bang in the middle of the interface. The insanity is further enriched by this graph:

Again, this is Microsoft’s own research, cited in the same post: nobody — almost literally 0% of users — uses the menu bar, and only 10% of users use the command bar. Nearly everybody is using the context menu or hotkeys. So the solution, obviously, is to make both the menu bar and the command bar bigger and more prominent. Right?
Microsoft UI has officially entered the realm of self-parody.

seldo:

This is genuinely Microsoft’s idea of a “streamlined”, “optimized” UI for Windows Explorer. They were so proud of it they wrote a blog post about it.

The post is a sort of masterpiece of crazy rationalization, but I think my favourite part may be this screenshot:

Here, they proudly overlay the UI with data from their research into how often various commands are used. They use this to show that “the commands that make up 84% of what users do in Explorer are now in one tab”. But the more important thing is that the remaining 50% of the bar is taken up by buttons that nobody will ever use, ever, even according to Microsoft’s own research. And yet somehow they remain smack bang in the middle of the interface. The insanity is further enriched by this graph:

Again, this is Microsoft’s own research, cited in the same post: nobody — almost literally 0% of users — uses the menu bar, and only 10% of users use the command bar. Nearly everybody is using the context menu or hotkeys. So the solution, obviously, is to make both the menu bar and the command bar bigger and more prominent. Right?

Microsoft UI has officially entered the realm of self-parody.

Sep 8
CSS Jedi

CSS Jedi

Sep 6
bl0ssom:

Manam Volcano, Papua New Guinea by NASA Goddard Photo and Video on Flickr.

bl0ssom:

Manam Volcano, Papua New Guinea by NASA Goddard Photo and Video on Flickr.

Almost 30 years before I was born and only 7 years and 7 months after starting my own Transport company I was a millionaire… If only.

Almost 30 years before I was born and only 7 years and 7 months after starting my own Transport company I was a millionaire… If only.

Returning Tomatoes on Flickr.

MOAR Timelapse

Timelapse of the clouds from my living room window