• Lorelle

    (@lorelle)


    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 15 replies - 31 through 45 (of 58 total)
  • Thread Starter Lorelle

    (@lorelle)

    Yes, IF people know how to change their default font, you give the user control over web pages’ look and feel. Unfortunately, the average person doesn’t know how. And instead of Courier, I should have said Arial or similar default sans-serif. I let the error go at the time because we’d just lost editing priviledges.

    You’re right, as I said, it would go to whatever the default font would be for the user. Again, we are talking about designing for contests and most designers take their fonts seriously. VERY seriously, even going to the extend of embedding fonts in order for specific fonts to show up on their page to control the design and look.

    While designers often think of “others” politely, it usually is targeted towards accessibility rather than font control. If this wasn’t the case, then why the heck do so many bloggers (and website designers in general) choose microscopic fonts and font sizes? And restrict them to fixed fonts through the use of px or pt. The user loses complete control over the font size this way.

    There are no hard and fast rules, right or wrong, on a lot of the stuff in this discussion. We’re talking about recommendations for people entering theme or style contests and “if we were living in a perfect world” this is how it would be done. While the W3C and others have worked hard to address the issue of web standards, web designers are still out there doing whatever they want, and waiting for the browsers that do whatever they want to catch up with them and their designs.

    But in a polite world, and well-mannered, code would be compliant with web standards, pass validation with flying colors, work with every browser, meet the needs of EVERY viewer, and be clean and streamlined, easy to read and understand (there is a difference you know ?? ), and be pretty or at least awesome.

    Everything else is opinion.
    ==================================
    So what else can we say to help contest entrants to design better CSS and Themes and help those who use the end results? I’m not a judge – thank goodness – just helping people figure out the problems that can come from writing code for the general population of WordPress fans.

    What are some of the problems those of you who designed Themes came across?

    Thread Starter Lorelle

    (@lorelle)

    What are some good fonts for Mac, by the way?

    jinsan

    (@jinsan)

    mpt

    (@mpt)

    Lorelle, beautiful sans-serifs installed on OS X by default include Lucida Grande, Futura, Optima, and Helvetica Neue (a newer version of Helvetica). You may also like Gill Sans or Impact.

    If you like one of those, try the opposite of what Root suggested — for example, {font-family: “Futura”, “Trebuchet MS”, sans-serif;}. That way Mac users get Futura (Macs usually also have Trebuchet MS, which is why you should put the Mac-only font before it in the list), Windows users get Trebuchet MS (IMO the most beautiful sans-serif on most Windows systems), and after that it’s up to the browser.

    Thread Starter Lorelle

    (@lorelle)

    Have another additional piece of advice for those designing for contents and public use:

    Do not remove “default” CSS references!

    I just removed the “calendar” styles from my own personal website and suddenly realized that Kubrick (WordPress default) doesn’t use the calendar, but left the styles in in case someone wanted to use them. In fact, I think they are styled to look good if someone did want to use them.

    Just because we like some detail or not, we need to leave the core coding in, commented out or whatever, but these have to be designed for a wide variety of user needs not just our design desires.

    This might go without “saying” but I find that everything needs to be said at least once or twice to make sure someone is actually “listening”…hee hee.

    Root

    (@root)

    Does any one know of a good day to day sans serif available on linux boxes?

    Thread Starter Lorelle

    (@lorelle)

    Or any other fonts for Linux? I just keep forgetting that they may see things a little differently, too. Good point!

    jinsan

    (@jinsan)

    You may find this Unix related article relvant:

    https://www.codestyle.org/css/font-family/sampler-UnixResults.shtml

    Just to add, Lorelle, though I appreciate that the default references should be in there, for something like a single column theme which is specifically designed without the use of a calendar, it becomes very much redundant. If the user feels they want a two column theme, then they really should go for a 2 column theme instead of converting a single column theme into a two column one.

    In all other cases I think the inclusion of default references for the css are absolutely fine, as they would have the space to play with such elements, but when you have only one column it’s going to be pretty tight anyway. So, perhaps, there would be some exceptions to the rule (and a rather good rule I might add)

    Thread Starter Lorelle

    (@lorelle)

    No, you’re right. I wasn’t taking about stopping additions, but saving the core references. It can be 14 column (they are out there, I’m sure) for all I care.

    Make sure that class="post" stays that and not change it to class="fred" just because you think “post” is boring and you always named your main section “fred”. But if you are adding a fourth column, then you can name it anything you want.

    Again, these are things designers for contests and public consumption need to worry about. The rest of us tweaking the snot out of our sites, we can do anything we want…and will!

    =====
    Now, a note about multiple columns. The folks at Position is Everything have saved the rest of us a lot of misery by coming up with two phenomenal examples of 3 column layouts that validate totally and completely and work across browsers – I think – without fail. They are constantly being tested and improved and all the documentation on what they have done to push and shove the code around to make it validate and WORK is all there to study. When I was first learning CSS, I printed out the page and the source code and just studied it like a fiend. It’s an education in and of itself.

    So if you decide to go 3 column with your design, take some time to get to know the following two pages and code – very well.

    Position is Everything’s 3 Complex Column – Perched on a Lily Pad
    Position is Everything Piefecta Ridid 3-Column Layout

    Good luck ??

    Tabs at the end of a line drive me batty. It should look good in notepad as well as anywhere else.
    Tabs at the beginning for spacing and readability are to me pretty important.
    (In css, you can get away with no tabs at all and still have readability; in other programming languages – not so much.)

    Thread Starter Lorelle

    (@lorelle)

    I’ve been pouring through the tons of wonderful entries in the current theme contest and I’m so seriously impressed. There are some very creative folks out there doing amazing things.

    And the host, Alex King, has some really good comments on what makes a theme work in such a contest, so read the fine print and commentary very closely. He’s spent a LONG time fixing many of the entries before they can be made public, and some just weren’t “fixable”. But overall, they are amazing!

    I just thought I would add a couple notes, as I’ve spent way too long going through all of these marvelous designs.

    Design the WHOLE thing not parts
    I’ve mentioned this before but I’ve seen a lot of little details missed. For example, the hovers and links are all designed, but the visited mode has often been ignored. Especially when cruising through a long list of themes in the sidebar, I kept losing my place. Sure, I could often see the one highlighted that I was on, but I couldn’t see which ones I’d looked at last time I came snooping around. On some well-designed pages, yes, I could see the past visits, but on a lot of them, no clue if I’d looked at the page before or not. STYLE YOUR VISITED LINKS.

    Test Across Browsers
    For the most part, these are looking great in different browers, but I am seeing a few little details that sneak in between browsers. For the most part, they don’t matter, but the issues around floating or layered elements that overlap badly in one browser but look fine in another makes it frustrating for the viewer. Watch those edges and overlappings.

    Use Some Color, Folks
    I have to admit that I adore a very minimalistic look on a site. We work overtime on our own personal site to keep it real readable and clean, but I have to admit, in such a contest, if you really want to attract attention, add some color. Take some risks with color. Don’t clutter everything up with everything being a different color, but get colorful. Pastels are fine, but there are a million other color types. So have some fun and get colorful.

    Eye Sight Cruelty
    Luckily, this is rare, but there are still some designs coming out with tiny text. Watch that. And make sure there is enough contrast between the background color and the text to show up. The problem usually happens in sidebars rather than in the content area. Stylized sidebars are wonderful, colorful and dramatic, but if we can’t read the words and links, it’s a struggle to navigate the site.

    Using Graphics
    As a photographer, I adore sites featuring strong visuals and photography, but as a professional photographer, I recommend you make sure you are willing to give up rights to your graphics and photography, and that you make sure that your designs in general meet the requirements for copyrights and public release as outlined by Alex King, competition host. He will not post any questionable copyright sites or content, but it is your responsiblity to make sure you are protected, or totally releasing all protection rights.

    – – – – – – – – – –
    I think there are only a few days left, and themes are rolling in like crazy. I’m really humbled by the wonderful designs and great risks being taken in designing such powerful sites. Truly beautiful. Congrats to everyone who entered – outstanding work.

    And for the rest of us….I swear, we are all lazy slackers. Go check out the contest and be inspired!!

    With the exception of your second, and possibly the first point, I think most of those come across as personal gripes rather than style flaws. I’ve seen some exceptionally well designed, professional sites that follow the first two rules, but ignore the others – at the end of the day it’s the designers choice how they style their themes, and how they choose to design it for the mass public who will in the end decide whether or not they like a theme by voting with their bandwidth.

    Some things seem a given – the giving up copyright of images used being one example. If a designer is aware that this is a design contest for themes that will downloaded by tens, hundreds, or even thousands I hope they aren’t naive enough to say “you can’t use my image you dirty scoundrel!”

    You’ve offered good guidelines, but as long as it’s left to the indivudal not to feel pressured to change things. If it’s how they want the theme, let them have it that way – of course it makes it more difficult for modification but the designer should have the final say and be left with the consequence of their decision. If they find they get a flood of complaints, that’s their skills as a theme creator tarnished.

    Then of course most would come here to complain and then get told to contact the author:)

    The best way to be a critic and tell people how it’s done, is to do it yourself and show how it should be done. Lead by example, and others will follow.

    And kudos to everyone that’s taken the time to submit their themes for the WP community, I’m sure everyone welcomes your committment to providing a wide selection of themes to both inspire and to be used by the users.

    I would like to make an effort to draw these two strands of the designer v coder debate together. The coders do not regard things like validation as obstacles, requirements or qualifications. They treat them as tools Instead of saying *OMG I have 200 errors* we can take that as really valuable info and start cleaning up. Because if you have both a bork and non validation simultaneously you do not know which error to fix first. Likewise simplicity. It is a tool in itself. But here is the thing. All this stuff effects how the page works . Use photoshop mockups, or sketch away till your heart is content. But until the bare bones are up and running cross platform and in legacy browsers it isnt good html. It is just a drawing. Fancy maybe. But it is only an image. The great thing about CSS is that it is a very long journey and a lot of fun. ??

    TopStylePro users: I think you can set up your own default in “StyleSweeper” to put elements however you like them. (I say “I think” because I think I had it all set up that way – before a new hdd and reinstalling everything *sigh*). IIRC, reframing stylesweeper to work the way one wants it takes some time but ultimately is a time-saver down the road….

    And btw, guys, this whole thread is PRICELESS. Could this somehow get stickied?

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