News for hackers. Stuff that matters.
Re:CSS: The Good Parts by iron_ball on Friday May 04, 2012 @09:50AM (#3928328)
The original article is here: http://www.impressivewebs.com/css-the-bad-parts/

I don't know if this was blogspam or what.

Re:CSS: The Good Parts by namzo on Friday May 04, 2012 @10:38AM (#3928551)
I think you meant http://www.impressivewebs.com/css-the-good-parts/

Edit: I noticed that both articles have the same author.

Re:CSS: The Good Parts by iron_ball on Friday May 04, 2012 @10:40AM (#3928564)
Good catch, yes I did! I was typing that on my phone, and had the wrong thing in my paste buffer. Both articles are worth reading though.
Re:CSS: The Good Parts by ImpressiveWebs on Friday May 04, 2012 @05:42PM (#3930468)
Thanks for linking to my original post (and below). At least the scraper version does link back to my original, so not a complete loss. :)
Re:CSS: The Good Parts by lucian1900 on Friday May 04, 2012 @08:39AM (#3928093)
I had expected a small, opinionated book on CSS.

Instead, there's a decent article.

Re:CSS: The Good Parts by loeschg on Friday May 04, 2012 @03:05PM (#3929831)
Same. I gleaned quite a few little tid-bits from this article. I started reading and was able to branch off with the provided links to get more in-depth information.
Re:CSS: The Good Parts by leephillips on Friday May 04, 2012 @10:06AM (#3928388)
A good article with useful links, as was his "bad parts" article. But I'm puzzled by his complaint about CSS commenting style. In Vim, using the tcomment plugin, I can comment out whole or partial lines with a few keystrokes, in many languages, and Vim knows what language is in the buffer and uses the correct comment syntax, so I don't even need to remember it. Other editors and plugins have similar functionality. It sounds like the author is commenting/uncommenting by hand. As is so often the case, using the right editing tools makes your life better.
Re:CSS: The Good Parts by jack-r-abbit on Friday May 04, 2012 @11:13AM (#3928732)
Having a tool to make something easier is one thing. But the commenting style complaint is valid. I am not puzzled by the complaint. It would be nice to have it work as he described so you would not have to rely on the tool to be there.
Re:CSS: The Good Parts by ender7 on Friday May 04, 2012 @10:35AM (#3928534)
Note that attribute selectors have really terribad performance on complex pages; avoid them if you're writing a single-page web app.

(actually, most things have terribad performance on complex pages, including inheritance selectors, :nth-child, sibling selectors, and tag selectors. Basically, the only selectors that are fast in CSS are IDs and classes with no inheritance. Wooo.)

Re:CSS: The Good Parts by acdha on Friday May 04, 2012 @01:02PM (#3929316)
That statement is too broad to be correct: modern browsers have had work optimizing selector performance (see http://calendar.perfplanet.com/2011/css-selector-performance...) and you really need to measure before drawing conclusions, particularly when the alternative of cargo-culting less semantic, harder to maintain code has its own costs and doesn't get as much performance attention as browsers do.

Since there are are now CSS profilers for Chrome, WebKit and Opera (see http://perfectionkills.com/profiling-css-for-fun-and-profit-...) you can also make the better comparison: your actual site.

Examples: http://stevesouders.com/efws/css-selectors/csscreate.php?n=1... http://stevesouders.com/efws/css-selectors/csscreate.php?n=1... http://stevesouders.com/efws/css-selectors/csscreate.php?n=1... http://stevesouders.com/efws/css-selectors/csscreate.php?n=1...

All four are very close in time in Chrome and Firefox - within 10ms or so. In all permutations of this, what really makes the most difference continues to be the question of how quickly the browser can narrow the set of nodes under consideration, which usually comes down to how well your markup makes expressing relationships natural rather than syntax tricks.

Re:CSS: The Good Parts by debacle on Friday May 04, 2012 @10:52AM (#3928615)
We did some benchmarking. It's easier to use jQuery to do the DOM traversal than it is to let CSS try and figure it out in most cases when you're using inheritance selectors.
Re:CSS: The Good Parts by stroebjo on Friday May 04, 2012 @11:36AM (#3928845)
Quick and dirty one-line comments should be used very carefully. Before a block it can break the selector, so no styles get applied.
Re:CSS: The Good Parts by logical42 on Friday May 04, 2012 @01:25PM (#3929407)
not a very long list i see..