The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Good/Bad practice. Re: Good/Bad practice.

Chris Coyier

Yeah keep CSS in CSS as much as you can for sure. Don’t be too dogmatic about it though. There are always cases where certains ways of doing things make sense. In the case of that snippet – it does what it says on the box. In general though, I’d move that style out of the JavaScript and into the CSS.