I believe you are wrong. There are valid reasons for adding inline styles.

For instance, when creating a plugin or widget for a CMS or other managed site, often the CSS and/or the HTML cannot be modified. Or perhaps something is created in the content itself that needs specific styling, if the CMS allows for HTML. Specificity problems really can be a headache when creating a plugin that creates multiple instances of something that must be classed, but cannot be more specific because of an outer wrapper's #id'd CSS declaration.

I hope that makes sense?

I feel about inline styles the same way Joan Crawford did about wire coat hangers: "No...Inline Styles..Ever!!" The points made earlier about file size and maintenance are right on. If you find yourself with seemingly no other way to go for an exceptional case, you're better off creating a custom class for that particular element than using an inline style. That way, you can comment your CSS to remind yourself and give others a hint as to why you had to do what you did - all while keeping your content and presentation separate.

______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to