5 ms·
mdo mentions this in his recent talk: http://jqueryuk.com/2015/videos.php?s=mdo-ular-css http://jqueryuk.com/2015/videos.php?s=mdo-ular-css tl;dr; It makes for
by blackant 11y ago
mdo mentions this in his recent talk: http://jqueryuk.com/2015/videos.php?s=mdo-ular-css http://jqueryuk.com/2015/videos.php?s=mdo-ular-css
tl;dr; It makes for cleaner grep results.
- oneeyedpigeon 11y agoWithout 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 11y agoThat is one of the reasons—you can view the slides also at https://speakerdeck.com/mdo/at-mdo-ular-css 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.
- oneeyedpigeon 11y agoMy aesthetic senses have always led me to a preference for button {} over .btn {}, class="foo bar" over class="foo-bar", etc. But I realise I'm in the minority and I need to get pragmatic. The slides have convinced me to check out the video tomorrow, which will be a start. codeguide.co also looks well worth checking out. At the risk of derailing the conversation further, what's the reason for leaving a trailing slash out of self-closing elements? I recognise it's optional, but including it gives you the option of XML-parsing your HTML; is there a non-aesthetic advantage?