MyBB Community Forums

Full Version: No more inline styles.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I think there are way too many inline styles in the current versions of MyBB. External stylesheets help make it easier to style elements without having to load as much front end code. Instead of this:
<div style="background: #fff;padding: 5px;border: 1px solid #000;">
Some text here
</div>
It could be:
<div class="custom">
Some text here
</div>

It would reduce loading times because it wouldn't have to load the extra code on the front end.

I think the inline styles should be reduced or even eliminated in 2.0.
(2010-08-01, 04:03 AM)Joshee Wrote: [ -> ]I think the inline styles should be reduced or even eliminated in 2.0.

That's probably the plan. Smile
That would be great. It's also just a hassle when something has an ID, a class, and a few extra inline styles. It can get confusing Toungue
I personally hate the whole
<td class="tcat"><span class="smalltext"><strong>Text</strong></span></td>
on all but like 2 of the category headers.
(2010-08-01, 08:05 PM)Firestryke31 Wrote: [ -> ]I personally hate the whole
<td class="tcat"><span class="smalltext"><strong>Text</strong></span></td>
on all but like 2 of the category headers.

As do I. Makes it difficult to change the font size on just the tcat. Unbolding, too.
Of course a simple workaround if you need to unbold is by using thead or .tcat strong.

Nevertheless, this definitely needs an update for 2.0. If it doesn't, I'll eat my speaker.
(2010-08-01, 04:03 AM)Joshee Wrote: [ -> ]I think the inline styles should be reduced or even eliminated in 2.0.

2.0's new default theme will not use inline styles. Period. I won't allow it. Smile The only place where inline styles may be used in 2.0 are for styling usernames. That's the only instance I can think of where inline styles will likely remain, for ease of configuration.

(2010-08-01, 08:05 PM)Firestryke31 Wrote: [ -> ]I personally hate the whole
<td class="tcat"><span class="smalltext"><strong>Text</strong></span></td>
on all but like 2 of the category headers.

2.0's markup will be as clean as possible. The current markup in our internal 2.0 mockups is quite messy, but I have some ideas on how I'll be cleaning that up as the templates are built in the future.
(2010-08-02, 12:26 AM)Scoutie44 Wrote: [ -> ]Nevertheless, this definitely needs an update for 2.0. If it doesn't, I'll eat my speaker.

Then again, I would really like to see you eat your speaker. Maybe I'll have Justin put in inline styles into MyBB 2.0
Ooh, for 2.0 can you make the box that goes around everything it's own template? You know, the one that goes
<table blah="stuff" class="tborder">
<tr>
<td class="thead">
{$box_title}
</td>
</tr>
{$box_contents}
</table>

It's no fun seeking out every instance of that and trying to change it if you want to try and do something fancy with it.
I think the only major gripe I have with MyBB are all the inline styles, so I'm glad to hear you're planning to eliminate them. It can be a real pain to work with the templates, which are placed in a great system btw, as it is now.