Live data from Hacker News

CSS: Our best practices are killing us

slideshare.net

11–20 of 54 posts

Re: CSS: Our best practices are killing us

#12
Guys 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?

Re: CSS: Our best practices are killing us

#13
The points brought up in these slides directly reflect my experiences over the past 3 years of doing my own CSS.

If 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

#15
post #9
post #6

I 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…

Excellent presentation - she knows how to present well. I still have about ten minutes left, but what surprises me is how unsurprising what she has to say sounds to my ears.

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

#16
post #6

I 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?

This is from CodeConf 2011, and unfortunately the talks were not recorded.

Re: CSS: Our best practices are killing us

#17

Guys 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?

http://news.ycombinator.com/item?id=2439818

Posted about ten minutes before you.

Re: CSS: Our best practices are killing us

#18

So 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

Perhaps a better staring place, with more context: http://oocss.org/

Re: CSS: Our best practices are killing us

#19

Guys 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?

Yep, just a slide deck. But it's a very good slide deck presenting something interesting and worth thinking about - that the specificity of css has some fundamental issues, and that we currently work around them in a destined-to-break-and-be-broken manner by moving towards inline CSS declarations and !important.

It would be better as a web page, but the content is still worthwhile.

Post reply on HN