MyBB Community Forums

Full Version: please do away with presentation junk in the html!!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7
IMHO styling html elements using the style="" property is never a good idea not even if something is only used once.
Inline styles cannot be overridden by stylesheets, unless you use the !important 'hack'.
(I say hack, because it's a way to compensate for bad styling practices or browser failures)

Javascript animations use the style property a lot. Hopefully in the future when css animations are supported in more browser that will be a thing of the past too.
How many users are seriously running their own custom stylesheets?
(2012-04-26, 01:02 PM)Uncontrol Wrote: [ -> ]How many users are seriously running their own custom stylesheets?

I am! Smile (well, I have one custom stylesheet...)
(2012-04-25, 05:52 PM)Uncontrol Wrote: [ -> ]I use inline styling for presentation elements all the time ... I only bother to make classes if it's something that's going to be used quite often. It is just used once, it seems weird to make a class for it.

Me too. Don't see a huge deal in it.

<span style="color: red">Do not set this on fire</span>
<span style="color: yellow">No making love in the forest</span>
<span style="color: orange">You passed the speed of light</span>

Any real difference? Nope.

<span class="warning red">Do not set this on fire</span>
<span class="warning yellow">No making love in the forest</span>
<span class="warning orange">You passed the speed of light</span>
I think the difference is that when you're designing a default theme, you want to make it so that it can be easily customized and modified through the stylesheets. Inline styles don't really accomplish that when you're talking about the theme itself.

Inline styles in things like posts (or page content in general), mostly for styling text and the like, should generally be acceptable.
Well true from the MyBB perspective having all the styles actually in the css would be nice. Almost all of it already is.
Pages: 1 2 3 4 5 6 7