Author Archive

Use uppercase text judiciously

Occasionally I come across websites that use uppercase text a lot. Probably the most popular use of uppercase is in navigation menus, which may not seem like a problem. Menus don’t consist of paragraph after paragraph of text, after all, and it is generally the use of uppercase for entire sentences or paragraphs that is recommended against.

Here are a few articles where the use of uppercase text is discussed:

Read full post

Posted in , .



Conditional and custom next/previous post links in WordPress

Many blogs have links to the next and previous posts at the beginning or end of each post. The default theme in WordPress 3.0, TwentyTen, has those links too. But what happens when you’re viewing either the latest post or the very first post of a blog?

In TwentyTen, no previous link will be created on the first post, and no next link will be output on the latest post. This makes sense since there obviously is nothing “previous� or “next� to link to. However, there is some unnecessary markup that will always be output, and here are a couple of ways to get rid of it.

Read full post

Posted in .



Removing title attributes inserted by TextMate’s Hyperlink Helper bundle

As I have mentioned in several previous posts – Don’t duplicate link text in the title attribute is one – automatically adding a title attribute to every link you create is not particularly good practice. Unfortunately one very useful command in TextMate does exactly that – the Wrap Word / Selection as Link command from the Hyperlink Helper bundle.

What the Wrap Word / Selection as Link command (Shift + Ctrl + L) does is wrap the currently selected text (or if no text is selected, the word the cursor is in or next to) in a link to the URL in the clipboard. This is very useful when inserting links in blog posts for instance. The downside is that Wrap Word / Selection as Link will also insert a title attribute with the title of the page the link points to. In my experience that is almost always unnecessary, so I’ve removed the offending title attributes after creating links in TextMate a gazillion times.

Well, I finally realised that it doesn’t have to be this way and that it’s easy to edit the Hyperlink Helper bundle to remove the annoying title attributes completely. In case there are others who also want to do this, here’s how.

Read full post

Posted in .



HTML5 allows almost any value for the id attribute – use wisely

As I mentioned some time ago in Creating valid names with the id attribute, HTML 4.01 is pretty restrictive regarding what values are allowed for id attributes:

ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens (“-“), underscores (“_�), colons (“:�), and periods (“.�).

Well, HTML5 changes that by allowing almost any value for the id attribute:

From HTML5 3.2.3.1 The id attribute:

The value must be unique amongst all the IDs in the element's home subtree and must contain at least one character. The value must not contain any space characters.

Read full post

Posted in .



Beware of -webkit-text-size-adjust:none

The other day I came a cross a website with text too small for me to read it comfortably. I hit Command-Plus a couple of times to make Safari bump up the text size a bit… and nothing happened. What?

After some investigation of the CSS used on the site the culprit turned out to be the following CSS (don’t use):

body {
    -webkit-text-size-adjust:none;
}

What that does is prevent WebKit-based browsers from resizing text. Not even full page zoom resizes the text. Now, how can preventing your users from resizing text be a good idea?

Read full post

Posted in , , .



  •   
  • Copyright © 1996-2010 BlogmyQuery - BMQ. All rights reserved.
    iDream theme by Templates Next | Powered by WordPress