Re: General theme stuff (markup n shiz)
Reply #3 – December 07, 2012, 04:19:51 am
Agreed, and I actually starting the same "diet" for my own fork of SMF 2.0..I can't really say much right now since I just started, but I know from past experience that a a lot of id targeting will make it a lot bigger. So I think part of the solution is to either mash togehter lots of id's that share same style - or use a lot more classes.Which implies changing templates too.(which I am doing anyway, but it is a major job no doubt) When you think of it, many sections share the same look, its just minor details that separate. Also, using some sort of grid styles can help with the layout targeting.(this I nagged about before lmao : ) so you need less id's to place items. Heck, even something like 960grid can help.
Re: General theme stuff (markup n shiz)
Reply #4 – December 07, 2012, 06:48:31 am
Well, I've been thinking of using a lot of id's purely as styling hooks that custom themers can use if they want to, but not relying on them for the default theme. I think that's the best way to build in flexibility without bloating the default css. Also, I do not like presentational classes. They're generally considered to be bad practice these days anyway, so I'd strongly prefer to not see crap like class="smalltext" and class="windowbg" and class="windowbg smalltext padding" and all that nonsense. As for sections sharing the same look, I've pushed that in the theme I've been playing with and I really like the results. Not only is it simple, but it looks coherent. News fader, board index, info centre, message index, unread pages, etc all share the same basic markup and most of them use the exact same sizes and spacing. This keeps the css simple for default, and by having id's built in on parent wrappers (id="boardindex", id="messageindex", etc) you are giving a lot of scope for future alterations. The id's complicate the markup a bit, but not very much because they're only needed at a fairly high level so there aren't many of them. The lack of presentational classes does complicate the css slightly (you may have to string a few classes in a declaration), but not much if it's done sensibly, and it saves a lot of crap in the markup. That's more important IMO.