-
BLOG
Calendar
Random project
New Competencies for Theme Designers
Wordpress 2.5's new image uploader solves the longstanding bug of using deprecated XHTML attributes to float images (align="left", etc.), rather than it being done in CSS. This is handled by applying classes to the image when it's inserted into the post, rather than via inline CSS. This is good, in terms of semantics, clean markup, and separating presentation from content. It's something that Scott suggested a while back, that I've been building into my themes and designs since.
This places the responsibility on theme authors to support the new classes. They are:
alignleftalignrightaligncenter
I'm not convinced of the need for the align prefix, but it's great progress nonetheless. If your theme doesn't support those classes, here's the code you can insert at the end to handle them:
.alignleft,.left {
float:left;
margin: 0.5em;
}
.alignright,.right {
float:right;
margin: 0.5em;
}
.aligncenter, .center {
display: block;
text-align: center;
margin: 0 auto;
}









11 Comments
I got a kick out of seeing those, too. I agree now too that ‘align’ might be a bit too much. But it is written in stone now.
Speaking of inline styles, what’s up with using the
styleelement as compared to thestyleattributes in the default gallery short code settings?Yet again, we’re left to question exactly which side of XHTML our semantic blogging application is on. Heh.
EEEWWWWWW. That’s gross, I hadn’t tested the gallery feature yet. I suppose for large galleries, it’s lighter, but still.
I don’t know why they can’t stick that stuff in
wp_head()Oh, and you forgot the original addition to the three standardized classes mentioned above:
.alignnone.Here’s some CSS for that one:
.alignnone, .none{
float:none;
}
Yuk, yuk, yuk.
I have to say, though, I do like the various image size-specific classes that are automatically inserted. It’s a step forward.
Good tip, Adam. Thanks.
I really like this blog but I wish to heck I could read it. There is no contrast between the deep orange font and the black bg.
Some time ago - possibly as my skills increased (maybe not) I became a lot less interested in themes and a lot more interested in admin panels which are a sub cat of web apps in their own right. I haven’t yet held forth on the WP admin but watching the process and reading the commentary
has fascinated me. I am well out of touch with the goings on at Habari - I haven’t looked at it in months. But once I saw graphics of centered admin
panels with fixed widths of 1024 and Blueprint CSS I knew it wasn’t the place for me. *Graphic Design* led development has been the death of many an app. It nearly killed Shuttle.
What Matt did to Jeffery’s stuff God alone knows.
But WP has no track record of developing GUI which are remotely satisfactory. Or of listening to the people who have.
So how on earth did you blag a WP day job?
Me? I had to switch to Joomla to get anyone to pay me regularly.
As far as the site, yes, I’m annoyed by it as well, but I’m short on time to devote to my own projects.
From the sounds of it, the admin design is more JSM than Jeffrey
I didn’t say I liked Joomla.


And your design studio site is borked in FF on linux. No SEO pricing / results.
Thought you would appreciate that.
Heh, in this case broken = unwritten. I should probably just remove those links.
I have started to use *global classes*. Global classes are a generic set of classes which are always available for that particular type of work. So a php non CMS site always has the same set. That way in an environment where production is distributed the html guys can rely on certain things being in the CSS. Commercially I think that is important. The reason is that at our place I try and keep the development of the html separate from authoring of the CSS. That way they don’t impede each other. But you need to know that the two ends of the tunnel are actually going to meet in the middle. The reverse is also true. We use other types of class sparingly. Where poss we just use semantic mark up and descendant selectors.
I suppose the issue with
.rightis that you can’t rule out the possiblility that inexperienced theme designers have been using it for their sidebars…I suppose there’s a possibility of getting more styling than you bargained for, but overall, a sidebar generally has
widthandfloat, so it would seem like a good thing (I don’t know how the kids are coding their themes these days).Post a Comment