CSS: Our best practices are killing us
11–20 of 54 posts
Re: CSS: Our best practices are killing us
#12I click on the link, I get a slide-deck. No text, no audio, just a bunch of slides with various numbers on them.
Am I missing something? Is this something where a bunch of people saw the presentation live and are now upvoting it here? If so, is there a video link to the live presentation?
Re: CSS: Our best practices are killing us
#13If you're familiar with the CSS precedence rule, these slides might read like blog post; they did for me.
Strangely, I rarely see the precedence rule brought up in CSS documentation or tutorials. Not until I read "The Ultimate CSS Reference", by Tommy Olsson & Paul O'Brien. I highly recommend this book.
"Coding by Firebug" as it's called in the slides, probably refers to what I used to do before reading the above-mentioned book: tweak styles, wonder why they weren't taking effect, then add classes or IDs to the markup until something sticked. This is the "increasing specificity" also noted in the slides.
Once I understood the CSS rule of specificity - inline, id, class, element - I stopped polluting my markup and CSS.
Nowadays, I generate CSS with SASS partials (templates within a Ruby on Rails app), compiled together by Compass. Each partial starts with an ID at the top, with other ids, classes, or elements nested underneath. These are compiled into CSS - and I'm sure at the CSS level there is TONS of duplication - but this doesn't worry me one bit; my source code is DRY.
I suspect this is what Facebook and the other sites mentioned in the first few slides do too, so the rule duplication is probably not such a code smell as one might think.
Re: CSS: Our best practices are killing us
#14http://www.stubbornella.org/content/2010/07/01/top-5-mistake...
Re: CSS: Our best practices are killing us
#15I hate asking to be spoon-fed, but I find it exceptionally difficult to glean anything from context-free slide decks posted to SlideShare. This deck was clearly intended to augment a presentation -- where is that archived?
Probably this one: http://www.webstock.org.nz/talks/speakers/nicole-sullivan/cs... I attended the talk and the workshop. What is interesting is that it genuinely challenges. Some CSS designers who I really respect did not 'buy in' to her theory even after spending a day with her. However, as a programmer, who has since used the OOCSS in a context 'for real' I found that it does live up to its promise in practice (unl…
So, I'm not a web designer. I've used CSS before, but just in very small amounts to get basic "here I am" pages up. I'm a systems programmer. That means I spend my days in languages like C, C++ and Python for scripting. I sometimes drop down to assembly. It sounds like she's describing basic good programming practices.
Re: CSS: Our best practices are killing us
#16I hate asking to be spoon-fed, but I find it exceptionally difficult to glean anything from context-free slide decks posted to SlideShare. This deck was clearly intended to augment a presentation -- where is that archived?
Re: CSS: Our best practices are killing us
#17Guys who are upvoting, could you please explain to the rest of us what we're supposed to be experiencing here? I click on the link, I get a slide-deck. No text, no audio, just a bunch of slides with various numbers on them. Am I missing something? Is this something where a bunch of people saw the presentation live and are now upvoting it here? If so, is there a video link to the live presentation?
Posted about ten minutes before you.
Re: CSS: Our best practices are killing us
#18So the prime example of what not to do is the sidebar/h3 example. Then the example for what to do is a simple example from Facebook. How about showing us how to actually solve the first problem? For anyone wanting to know more about this presentation, check out her Object Oriented CSS: https://github.com/stubbornella/oocss
Re: CSS: Our best practices are killing us
#19Guys who are upvoting, could you please explain to the rest of us what we're supposed to be experiencing here? I click on the link, I get a slide-deck. No text, no audio, just a bunch of slides with various numbers on them. Am I missing something? Is this something where a bunch of people saw the presentation live and are now upvoting it here? If so, is there a video link to the live presentation?
It would be better as a web page, but the content is still worthwhile.
Re: CSS: Our best practices are killing us
#20- don't add any extra elements
- don't add classes
- use descendent selectors exclusively
the second two i've never heard in my life, and i'm quite sure the first is not a myth.