leff

Mr. Webpage

a blog about putting content on the web

Posts tagged with "css"

Thursday 20th December, 2012
Monday 26th November, 2012
Wednesday 21st November, 2012
In this particular (and rare) circumstance [of large websites with lots of legacy CSS], where dueling developers have added rule after rule to a huge, shapeless style sheet that is more of an archeological artifact than a reasonable example of modern code, Nicole’s admonition to avoid descendant selectors based on id is probably wise.

In response to: In Defense of Descendant Selectors and ID Elements – Jeffrey Zeldman Presents The Daily Report

Rare? RARE? What kind of dinky little disposable sites does Zeldman work on? I can’t take anything that he says at face value, because I just don’t work on the kinds of projects he works on. I’ve never worked on a serious project that didn’t have tons of jumbled css.

Also, is it just me, or do his arguments for ids just not make any sense? How is an id “more semantic” than a class name? #footer and .footer both say footer. What’s more meaningful about # than . ?

Saying you just need a master chef and permission to do some refactoring shows a lack of understanding of two things.

One. Refactoring CSS is hard. When it’s not compartmentalized in the manner of OOCSS or SMACSS it’s really, really hard. Because it’s all one jumble and you have to test everything on every change.

Two. A master chef would have to have absolute control over all html and css. I mean code review every checkin and make every dev do things the ‘right’ way. But if there’s no system of compartmentalization, then every contributor has to have just as much knowledge and comprehension as the master chef. That’s totally untenable. Each dev needs to write ‘good’ CSS on their own, or you’ll have to correct them every time.

So, those are the two main problems that OOCSS and SMACSS try to solve. In that context, I don’t think Zeldman’s arguments are very relevant.

Monday 24th September, 2012

(via Your CSS is a Mess // Speaker Deck)

I wonder if embedding works for slide decks.

Tuesday 14th August, 2012
To combat this font-sizing problem, we now have access to the rem (root em) unit. This is still a relative unit, but it’s always relative to a fixed base value, which is the font size of the root element of the document (in HTML, that’s always the html element).
Thursday 28th June, 2012
Monday 18th June, 2012
Tuesday 12th June, 2012
Tuesday 12th June, 2012
Using ID selectors
To be clear, using ID attributes in your HTML can be a good thing and in some cases, absolutely necessary. For example, they provide efficient hooks for JavaScript. For CSS, however, ID selectors aren’t necessary as the performance difference between ID and class selectors is nearly non-existent and can make styling more complicated due to increasing specificity
Monday 21st May, 2012

Cutting the mustard

responsivenews:

The browser is a hostile development environment and supporting a wide range of desktop browsers can be tough work.

One of the immediate challenges we discovered when we first started the responsive news prototype was the large range of devices that we would have to support. It terrified us. This article is about a solution we use to alleviate this problem.

Read More

Mr. Webpage is also