top | item 9253123

(no title)

blackant | 11 years ago

mdo mentions this in his recent talk: http://jqueryuk.com/2015/videos.php?s=mdo-ular-css

tl;dr; It makes for cleaner grep results.

discuss

order

oneeyedpigeon|11 years ago

Without having watched the video, that sounds like a weak justification at best. I'm sure best practises could be ignored in many scenarios with the effect of slightly more greppable source, but that would normally be counterproductive. I guess we need better command-line search tools, really, ones that understand the structure of the file they're inspecting beyond a line-by-line representation.

mdo|11 years ago

That is one of the reasons—you can view the slides also at https://speakerdeck.com/mdo/at-mdo-ular-css if you don't want to watch the video.

I like to use prefixes and base classes. It's faster for browsers to paint, leads to fewer rules overall, reduces selectors, and helps prevent unnecessary overrides.