Conundrum

Part of it is the way we’re “using” LESS. When you place the style inside the brackets, when the stylesheet is built, it will imply the cascading no matter how you intend it to be.

So


    #advertiser {
        color #red;
        #centerContent {
            color: blue;
            p {
            color: green }
        }
    }

Will generate


#advertiser  { color: red; }
#advertiser #centerContent { color: blue; }
#advertiser #centerContent p { color: green; }
 

So you REALLY have to pay attention to how you’re coding your css, or you end up with the spaghetti crap that you don’t really want/need…personally, I don’t like it and would rather we not use it but it’s the tool they decided to go with.

What seems to help people understand CSS is to keep reminding themselves with baseball bats that it’s not a programming language and does not employ programming-style logic. Throw logic out the door. It’s pure rules. Pretend it’s D&D.

That generated CSS makes me want to explode puke all over everything. Gross.

Handy rule of thumb: if we’re using two #ids in a single declaration, something has probably gone horribly, horribly wrong. And that something might be the markup rather than the CSS itself, but it’s still an abomination unto Thor and should be killed with fire. Or blamed on junior web designers.

it but it’s the tool they decided to go with.

Looks like Nicole got to them before they had a chance to ever debug some of the CSS that can come out of that thing. My sympathies.

On another note, even LESS/SASS supporters are starting to suggest people NOT do the nesting thing, for this very reason. It looks so nice and easy, but spits out total garbage unless you walk on eggshells. Which of course we ALL want to be doing all day at work.

I suspect there are people out there though whose thought processes work perfectly with LESS/SASS/etc and don’t have to think twice to prevent #garbage #garbage. Who knows, mutations happen and I believe in evolution. Devkind will mutate, adapt or die.