• WordPress “powers that be” are serious about keeping things loose. However, when it comes to designing your styles or Themes for contests and public consumption, there are a few things you should take into consideration. I’ve been looking at a bunch of themes and styles, loving them all, but under the hood, there are a few things you should consider when designing your own.

    Start With The Default Template
    You can start with someone else’s theme or style sheet, that’s fine, but if you really want to do this right, start with one of the two default themes that come with WordPress. They are called “Classic” and “Default” aka Kubrick.

    Why start here? Because these have been through the presses by WordPress designers and testers, as well as bazillions of users who are more rigorous on these things than the developers. These are solid code, for the most part, and a good starting point. From there, do whatever your imagination desires.

    Style ALL the Template Files
    The old WordPress was all about the index.php file, forcing it to do all the work for every element of your page. Today’s WordPress uses modular elements to make up an entire page.

    The Default Theme for WordPress relies upon the index.php, sidebar.php, single.php (for a single post which looks different from the categories and archives), comment templates, header.php, and footer.php, among others. If you create a theme or style based on only the index.php, leaving out comments or others, you may run into design problems.

    If WordPress can’t “find” the modular part, such as the comment template, it will look for it in the default folder. Therefore, if the designer hasn’t taken this modular template into consideration, the layout and design might be a little messed up. It will work, but it could look weird. You don’t have to use all the various bits and pieces, keeping the header and sidebar inside of the index.php or single.php, but do look at the parts as well as the whole.

    Consistent and Standard Fonts
    Many new themes and styles feature only one font. I don’t mean just an overall font style for the whole page but ONE font. In the body style tag it would say:

    body {margin: 0; padding: 0; font-family: "Trebuchet MS", sans-serif; font-size: 12pt;....}

    What happens if the user doesn’t have Trebuchet on their computer? It happens every day. We’ll have a Lesson on fonts later, but if that font isn’t on the user’s computer, the system default shows up which is often Courier. If you like the look, great, because just about everyone has it, but if you want Trebuchet and don’t get it, then you have a problem.

    Add more choices to the font-family like this:

    font-family: "Trebuchet MS", Verdana, Geneva, Arial, Helvetica, sans-serif;

    If the browser can’t find Trebuchet, it looks for Verdana, and if can’t find that, it looks for Geneva, and so on. That should cover all your bases. ??

    There is another problem in the first font style presented. Notice the font size is set for 12pt. In general, this is a no-no. You can do it, but don’t expect every browser to see the same “point”. Use em, px, or a percentage to set your fonts such as:

    font-size: 1em

    or

    font-size: 12px

    Avoid font redundancies by NOT putting the font-family on every style. Set your basefont in the body tag style, then refer to the font-sizes in your design based on a percentage of the base size. By using a percentage instead of a fixed font, your site becomes immediately more accessible. For example, many people want smaller links in their sidebar menu, so that would be:

    menu ul ul {margin: 2px; padding:5px; font-size: 80%; font-weight: bold;...}

    If you want a larger font in your header, then set it like this:

    header {margin:20px; font-weight: bold; font-size: 130%;...}

    If you change your font to something totally different on, say, your sidebar, then list a new font-family, but if the whole site is set for a single main font, then list it once and be done with it.

    Optimize Your CSS Style Sheet
    WordPress stresses that code and style files should be laid out with a lot of tabs so they are easy to read. What I find are a lot of styles (and code pages) that feature a lot of wasted space. Get out your broom, folks, and clean up your bandwidth wasters.

    Every space, character, and bit in your code and style sheets add up to bytes. That sentence came to about 64 bytes. Each byte of information adds up and the larger they are, the longer they take to load. You do yourself and your users a favor by keeping your file sizes down to byte sized sizes. So where do all these bandwidth wasters hide?

    If you have set your code to look pretty with lots of indents, have you checked to see if there are any TAB codes at the end of the line before the line break? I find a lot of these. The Default Theme for WordPress has more than a dozen of these tiny invisible bandwidth wasters. You don’t need a TAB before a line break, only after, but somehow, these sneak into the code.

    Using spaces to line up code adds to the size. A TAB is considered one character in most editors, but the five spaces that copy the TAB indent takes up five characters. Using double spaces instead of single spaces in your code and styles adds up, too.

    Using a good search and replace capable text editor, you can quickly clean these up, making your styles and code optimized for fast loading.

    There are a lot of ways of optimizing your code and styles, but we’ll save that for later. Keep it clean and small and FAST.

    Validate! Validate! Validate!
    Make sure your codes and styles validate across the board. That means they have to meet the “strict” standards set by the W3C Organization and pass a variety of validations for CSS and HTML. It’s like an HIV test. The first one has a high false/positive and you need several to make sure your page tests positive consistently. In this case, positive is a good thing. ??

    Validation doesn’t just mean putting your pages through some web driven testers. It also means test-driving it with friends, relatives, co-workers, and strangers you meet on the street. Everyone has a little different system, so ask for others to test-drive your styles or themes before you make them public. And ask here in the forums. The Your WordPress section is dedicated to having volunteers check out your site while you are working on it, when you have trouble, or just to say ooooh and ahhhhhhh.

    What Else…?
    This Lesson has given you a few of the most common things you should take into consideration when presenting your themes or styles to the public, but it is only the tip of the iceberg. I’m sure others will chime in with a few more recommendations.

    There are no hard and fast rules for design. The sky is the limit. I recommend everyone take a look at the CSS Zen Garden to see the impossible made possible. All the rest of us are just asking for you to follow the rules of the game and make sure your code matches web standards and works for everyone.

    So what else do you think designers should know or do?

Viewing 13 replies - 46 through 58 (of 58 total)
  • Thread Starter Lorelle

    (@lorelle)

    It will be in the Codex, maybe as soon as this weekend.

    And none of these are “rules” but guidelines to help anyone designing themes. A lot of people think about entering contests like art contests because they think they are good at creating art. That’s fine, but there is a lot of work that goes into judging art and judges take a lot of different things into consideration when they make their decisions.

    The whole point of this topic is to:

    1) Help people design themes for the public so the public is:

    A) safe from crippled and un-uniform themes

    B) downloading themes that meet some kind of standard and consistency

    C) not going to swamp the forums with “why does it look bad in MSIE and terrific in Firefox” and other “why is it doing this” kinds of topics just because the designer slacked or didn’t take everything into consideration

    2. Help designers design themes:

    A) So designers know what is expected from them when they make their designs public (user’s expectations)

    B) What to take into consideration when desigining their themes

    C) Hear what other theme designers think about how they designed themes and made their decisions

    D) Know that there are some standards that should be met in creating themes and where to find that information if they need it.

    We’re all here to learn from each other. None of these are hard and fast rules, though I like to think at least code validation should be a rule, but I’m not making the rules.

    Like I said, the caliber of design work is incredible. I hope that at least a couple of the designers learned a thing or two about what to put into their public theme from this thread – so that we all work to do our best.

    And I’m glad that this has been a good topic. I loved it when Moose talked about planning a site by sitting down with colored pens and crayons and pieces of paper. I sure wish designing websites were as simple as using crayons, but it isn’t, and we all need to understand what it takes, what to expect, and what the public expects from the designs. All of it equals A LOT OF HARD WORK….and some fun, too.

    Please Delete

    Thread Starter Lorelle

    (@lorelle)

    A lot of these are included already in the article and in the Codex, but they are wonderful resources. Thanks.

    And trying to make things “look pretty” on the forum is difficult. We understand TOTALLY. Don’t worry.

    The article regarding all of this may be released this weekend. Stay tuned!

    Also, bear in mind particularly when designing styles for contests — the assumption being that there will be wide distribution of the design — be VERY CAREFUL where you go to obtain your design’s images. Quite a number of stock image repositories strictly prohibit redistribution of their images in templates, which is basically what you’d be doing. One of the few that permit it is StockXchange.

    Everybody can say what he wants but there is absolutely a relationship in the order of writing down your CSS and the way your page is build up.

    Not that I am one of the great top designers.

    That it is still a big mess on the Internet is not a surprise.
    Take a look at the site from W3C normal people get crazy if they are looking for something on their website.

    If you open a page first you see a whole lot of information your not looking for.

    You see a bunch of information about people who are related to the topic and then MAYBE some information what can be usefull,
    and then still you get confused.

    Still on W3C they are fighting about what is right and what is wrong.

    In the early beginning I already was working with DIV’s and LI.

    But at that time it was not recommended by W3C my pages did not validate.

    And what do you see now these days it is more common then ever.

    I can understand why people have problems with designing.

    But I think for the best keep in mind the following and I think a lot will agree.
    Build up your page together with your CSS file.
    If necessary split files into modules.

    Give specific ID’s any name you like starting with # or . or yourname.

    Seperate ID’s and classes.

    Although the W3C is a basis for developing the W3C is not really the handbook for beginners more and more it is a place for strangers and bigheads.

    The best is to think logical and to go step by step to the top of the stairs although sometimes there are some borders.

    As long as there are no specific basic rules it will be difficult all the time.

    So the best is to take advice from experienced users without specifically following the rules from BIG heads like W3C.

    W3C is also following us and is taking the best from us.
    Think logical and design logical.

    It means.. if you can do with A do no not ad B !
    Because A will do.

    I hope this contribution is not to complicated but will help some beginners.

    Thread Starter Lorelle

    (@lorelle)

    Thank you for your contribution to this thread. Unfortunately, designing WordPress Themes for public consumption isn’t like designing for your own personal site where you can do what you want with whatever you want to do.

    When designing WordPress Themes, the user who downloads the Theme has some expectations and assumptions.

    One, that the theme will work for them, no matter the operating system or browser they will use.

    Two, that it will pass any tests they put it through, like validation.

    And three, that it is “familiar”. This means that if they have been through one Theme, at least the core style classes and elements are the same in the second, third, fourth, or eighteenth Theme they are test driving or using with a Theme Switcher. The look may be different, but the internal elements are familiar, if not exactly the same.

    I’ll add a fourth. People come to these forums looking desperately for help to figure out what is wrong with a public Theme they downloaded. While we volunteers do our best to help, we also look for the familiar to help us solve their problems.

    The topic of this discussion is how to help people design Themes for public distribution. Your points are very good, but we also have to be conservative when it comes to guiding the folks who are excited about sharing their web page designs with the public. Some standards have to be followed. For now, we stick to the ones that are in writing.

    For those who want to stray from the path and break the rules and invent their own, I say go for it. But take care when you release that look for people to download as you may be overwhelmed with explaining yourself and troubleshooting to accomodate the thousands of WordPress users who take your Theme for a spin.

    Hi Lorelle

    Well you made some very important points indeed.
    That’s also why my new theme still isnt public for download.
    It is still under construction to take out child diseases,
    that is also why still certain references are used inside the CSS to find them.
    But on the other hand if the theme switcher does not pick up the CSS
    and is loading for example another file then meant to be for the real theme there is nothing wrong with the new designed theme but with the loaded files from out the theme switcher.

    On the other hand of course their must be a default, a safe heaven to start with !

    But when I look right now what has happened with 1.5.1 I wonder
    what is going on here.

    1.5.1 is in fact still Beta and causing serious problems and still defended as being better then 1.5.0. to take this one as an example.
    Ofcourse certain things are running faster.
    But I see bugs reffered to by hardliners that should not be there !

    So on this part of design it should have been better to send out some security patches first to take out certain problems instead of coming up with 1.5.1 with a clear description.

    This is not a statement to take WordPress down but a statement to build up WordPress better.

    In my opinion you did a very good job to start this topic.
    and I hope it will make WordPress even better then it already is.

    And then one more compliment for the help on WordPress !
    Websites like W3C PHP MYSQL and other bigheads could take this website WordPress as an an example for excelent support on all aspects of design.

    But still things can be improved and as far as I am concerned WordPress has a great future with all these fine people who give great support without any payment.

    Though I’m all for saving bandwidth, I think commenting and easy to read and decipher css is a great thing if I have to go in and change something. The few bytes I’ve “wasted” can save me a LOT of time if I have to go in and make a change. Or it can lead someone else right to the change they want to make if I let a theme design out to the general public, which I’m planning to do soon.

    Re font sizing– I think defining it on the body by using a word, like “small” is best, then using percentage adjustments on divs, tags, or classes which you wish to appear different. This gives the most easy to resize result across browserland. Pixel sizes are sometimes a problem (in IE I believe) and older browsers can’t handle ems well at all. There is no such thing as a “standard” font size anyway, as I’m reminded every time I look at something on my half-blind friend Jerry’s computer and see all those HUGE letters on his screen.

    FWIW, I think all css should be in the linked stylesheet in all themes. It defeats the purpose of easy edits when it is put in more than one place. I was glad when I found an article on how to “deconstruct” Kubrick before reconstructing it, that article shortcutted me a lot, since I would have been looking in the wrong places for things that were styled elsewhere than in the stylesheet. That article is here:
    https://www.urbangiraffe.com/2005/04/12/themeguide1/

    Re resources for css:
    https://css-discuss.org
    https://css-discuss.incutio.com

    I would never have learned css as fast as I did without this group. Eric Meyer is one of the group leaders and moderators. Holly Bergevin and Big John of positioniseverything.net, and Zoe, who also writes articles for communitymx are list members. They’re just a few of the many, many incredibly helpful and knowledgeable people who make up the list group. And when your theme isn’t working in IEMac– the answer is here.

    Thread Starter Lorelle

    (@lorelle)

    Isn’t it amazing all the stuff you learn just by going out there and screwing things up and then trying to fix it yourself ??

    Good points, all.

    IMO it is the responsibility of the designer to present clean and validating code, and irresponsible to do otherwise. Sorry, Jinsan, but it really isn’t that hard to offer clean code, and those who offer otherwise are being either lazy or ignorant. There’s plenty of help for those who get stumped on a validation problem re css or html or php, whether it be messageboards like this one, newsgroups, etc. If I offer a theme for download and use it’s guaranteed to validate– what you peeps do with it after I let it loose is your problem . . . and if it doesn’t validate after you’ve played with it, it’s your responsibility to fix what you screwed up.

    My other strong opinion is about where the css should reside. These themes are confusing enough to edit, with the multiplicity of files which makes a mistake easy to make and hard to find. Putting the css in more than one place, especially embedded or inline, is asking for trouble. Put it all in the style.css file please! Or at the very least put it all in external files that people can see are css only (for instance adding a print.css, a handheld.css, or an uglyieonly.css)

    Though I’m a fan of saving bandwidth, and use shorthand css all the time on my own (nonwordpress) sites, I think that the longhand css is better for themes that you’re putting out for the general public to use. They’re easier to read, edit and use for someone who maybe isn’t a css guru. It doesn’t matter to me personally, but I can remember when I was just starting out with css a few months back how confusing a completely shorthand stylesheet was to me. I’m going to opt to follow the KISS rule on this one (Keep It Simple, Stupid!) I’m also going to “comment” things to the hilt in both the html and css, so folks can find their way. And I’d venture to guess that if a peep liked two themes, one of them mine and one a shorthand bandwidth saver, and the peep wasn’t all that experienced with css, they’d end up customizing and installing mine instead of the other one. Usability should be key here, and I hope that, given the same situation in a contest, it’s weighted a bit more strongly than bandwidth usage. Yes, bandwidth is a consideration, but we’re not talking huge differences here, and the bit it takes to make something more understandable to a newbie who is trying to learn this stuff is worth it.

    The topic of this thread is something that has bugged me for quite a while and I’m glad to see it being discussed here. I usually lurk around but I have to put my 2 cents in here.

    I’m no designer – no CSS guru – not even close. I’ve hacked and slashed through 15-20 themes and the one big problem that seems to run across most of them is a lack of some sort of standardization. One has “content” the next “main”. One has “sidebar” the next “menu”. Makes things difficult especially when you’re trying to adapt non-WP add-ons.

    Kubrick’s stylesheet is a nightmare. It’s a great looking theme but why it’s used as the default is beyond me. It seems to break many of the “rules” that have been discussed here. However, sifting through it and understanding it has increased my level of CSS understanding and I’m grateful for that.

    Anyway, thanks to Lorelle and everyone here. All of the suggestions presented here can only help us all do a better job.

    Thread Starter Lorelle

    (@lorelle)

    So glad we can help. It’s a great discussion and brings up a lot of issues that Theme designers need to know about.

Viewing 13 replies - 46 through 58 (of 58 total)
  • The topic ‘Lesson: Designing Styles for Contests’ is closed to new replies.