Quotation Marks

In web design, the little things make the difference. Computers have historically used ' and " (the so-called ambidextrous quotation marks) at both the beginning and end of a quotation like so,

"A quotation using 'ambidextrous' quotation marks."

This was because of limitations in the space on typewriter keyboards and the limit of 128 characters available to ASCII. These days we’re a little more sophisticated and we can take advantage of Unicode to give us proper curly quotes, just like the ones typesetters used to use back in the day,

“A quotation using ‘book quote’ quotation marks.”

Of course, this is a tiny detail and most people won’t be conscious of it. That’s why most web designers don’t worry about things like this. Nobody ever complains about the look of quotation marks. Even if somebody did, would anyone really take such a complaint seriously? There are phrases for people who complain about this kind of thing.

However, even though these little things are too small to tickle the conscious mind, they are big enough to irritate that part of the subconscious that decides where people are going to spend their money. They contribute to the feel of a site and that’s why smart people pay other people to create web sites. We’re the people who are obsessive enough to make sure your quotation marks set you apart from the ordinary web sites out there.

Proper Small Caps

Genuine small caps aren’t just scaled versions of normal caps, they’re completely different glyphs. Here’s a black uppercase ‘M’ in Arno Pro overlaid with a semi-transparent blue small-caps ‘M’. The blue letter has been scaled up (keeping the width and height ratio constant) so its height matches the conventional uppercase black glyph. You can see that small caps are wider and have thicker strokes and more sturdy serifs.

In CSS we can supposedly achieve this by setting font-variant: small-caps; but browser support is limited: all you’ll get are small versions of the uppercase glyphs. Instead I prefer to use font-feature-settings:'smcp'; Here’s a quick demo. The blue letters are, again, lowercase characters rendered as small caps and scaled to match the height of the conventional uppercase black glyph.

Webkit Prefixes

Remember when web sites used to show phrases like “Best viewed in Netscape 3.0”? Web browsers used to be riddled with inconsistencies, bugs and proprietary features, thanks in large part to the so-called browser wars. Today we’ve largely solved these problems and as long as you’re using a reasonably up to date browser you, and more importantly your customers, should have pretty much the same experience of any web site in whatever browser you prefer.

There is one fly in the ointment though. It takes the W3C (essentially the internet’s powers that be) quite a long time to ratify new features. Consequently browser manufacturers, the likes of Mozilla, Google and Microsoft, have been allowed to use a feature called experimental vendor specific prefixes. Essentially they’re a way for browsers to temporarily provide features (things like drop shadows and rounded corners) before they’re completely defined by the W3C. The key word here is ‘temporarily’; they’re intended as a stop gap until the real features are fully supported.

Unfortunately, some web developers have been designing web sites on the assumption that these prefixes will be available for all eternity and that’s led to a potential problem. Some of these prefixes have become so ubiquitous that some browser manufacturers are considering implementing prefixes from other vendors in their own browsers; thus breaking both the ‘vendor specific’ and ‘experimental’ aspects.

Whilst this is nothing like as severe as the old browser wars scenario it does have significant implications for the future of stable, simple, cross browser support and may well lead us back into a world where developers have to spend their valuable time, and your valuable cash, hacking together awkward and complex code just to get things to work right.

So, what are the real-world implications for you when you’re looking for someone to produce and maintain your web presence? In short, there are two things you need to consider:

  • Make sure your developer is committed to producing high quality, standards compliant code. Unless you’re an expert yourself, this can be difficult to ascertain but simply asking the question is a great first step and it’s certainly something that should come up in your initial negotiations if not as an explicit statement on their web site.
  • This is just one more reason why it’s important to consider your web site as an ongoing project rather than a fire and forget commission. Make sure you build a solid, long-term relationship with your developer and be prepared to invest at least some minor future effort on web site maintenance and upgrades.

Drupal Multi Site Installations – The Magic Secret Bits

The objective of this article is to provide the missing background information that most Drupal multi-site tutorials miss out. It’s these nuggets of wisdom that make the difference between a multi-site installation that works and one that’s a right royal PITA to set up and get going. The article supplies the tricks and tips needed whether you’re:

  • On Windows or Linux
  • Using Drupal 6.x or Drupal 7.x
  • Wanting development and production setups
  • Using a shared database or individual ones

Before we discuss the advanced tweaks you might want to do, it’s worth taking a minute to understand how a basic Drupal multi-site installation works. Most of the confusion I’ve seen seems to stem from not really grokking what’s going on during the install. So, we’ll do a quick walkthrough of the major conceptual points of a simple two-site setup.

Supporting Multiple Sites

When you unpack the Drupal code you end up with a two major conceptual components; the Drupal codebase itself and a subfolder (and its children) called sites which is used to store the settings for your individual Drupal sites.

Although all your sites will use the same codebase, Drupal decides which of your sites to show based on the HTTP request that you give it through your browser. So, if you enter http://site1.com in your browser, Drupal will look for a folder called site1.com in its sites sub-folder and display the content as dictated by the contents of that folder. Likewise, if you have a folder within sites called site2.com and you enter http://site2.com in your browser, then Drupal will show the content for site2.com. In summary, create a folder for each site within the sites sub-folder of your Drupal installation. This is the basic mechanism by which multi sites are supported in Drupal but it can be tweaked in a number of ways.

In addition to this, you need to set things up so that requests from your browser for http://site1.com and http://site2.com both get routed to the IP address of the machine hosting your Drupal code. You also need to make sure your web server is routing those requests to the right folder. The exact details of how to do this vary wildly depending on your situation but it’s trivially easy to find out how to do this so I won’t repeat it here. Google is your friend.

Finally, you need to create the sites themselves. To do this you need to copy default.settings.php from the sites\default folder into each of your site folders (sites\site1.com and sites\site2.com in our example), rename it to settings.php and make sure both it and the site specific folder are writeable. The last step is to point your browser to http://site1.com to start the site installation. This process will make changes to your site specific settings.php including storing info about which database Drupal should use for storing the bulk of your settings and content. Repeat this for each of your sites. Oh, don’t forget to set the privs on settings.php back to read only.

That’s it. You’re all done. Note that we’re not setting up any themes or custom modules or views etc. This is just a basic bare-bones Drupal installation.

Overall, what’s happened here is that a single codebase is used by Drupal to translate incoming HTTP requests into pointers to the relevant site-specific subfolder of the main sites folder. The installer builds your site by writing the site-specific setup info into the settings.php file in those folders. These settings.php files, in turn, point Drupal to the relevant database when it’s building content for display.

Development and Production Setups

The above scenario assumes you’re installing straight onto a production server. In practice this is a bad idea and you’ll normally want to build your sites on a development server, usually localhost before you deploy to production and go live. How does Drupal support this situation?

When Drupal is looking for the relevant sites sub-folder, it doesn’t simply look for an exact match in the URL. If you take a look at the comments near the top of settings.php you’ll see the search order that Drupal uses to do this. Making use of this search order usually allows you to build a site in development and then send it to production with a minimal amount of changes.

In Drupal 6 this is the only option you’ve got but in Drupal 7 a new file has been introduced to the top level of the sites folder called example.sites.php. Copy this file to sites.php in the same folder and edit it. Down at the bottom are a couple of example site mappings. Edit these to suit your needs. So, in our example, with sites/site1.com and sites/site2.com sub-folders we would use the following:

$sites['site1'] = 'site1.com';
$sites['site1'] = 'site2.com';

Then, if you’re working on your development server you enter http://site1 in the browser (without the .com suffix) and Drupal will use the sites.php file to map this into a request for the folder sites/site1.com. On your production site, accessed through http://site1.com in the browser (with the .com suffix) Drupal will not use these mappings and will just go straight to the sites/site1.com folder automatically.

Sharing Databases

Some hosting services limit the number of databases you can create. Drupal allows you to share a single database between multiple sites.

Before you run the Drupal installer you need to create your database(s) yourself using something like cPanel or phpMyAdmin. If you want to dedicate a database to each Drupal site then just create databases called site1 and site2. If you want to share a single database between all your Drupal sites then create a database called drupal. Finally if you want to share a single database between all your Drupal sites as well as other stuff then just create a database called shared.

If you’re using either the drupal or the shared options then you’ll need to tell Drupal you’re using a shared database. You do this by specifying a table prefix on the Advanced Settings section of the database configuration page which you’ll encounter as part of the installation script. In our example we might use the prefixes site1_ and site2_.

What About sites/all and sites/default?

In addition to the site specific sub folders we created under the Drupal sites sub folder, you’ll probably also notice Drupal has its own sub folders here called sites/default and sites/all. The first of these is used by Drupal to store your site if it can’t fins a site specific folder like the ones we created. The second is used to store modules and themes that will be available to all your Drupal sites.

Further Reading

Chrome Dev Tools Auto Save

Modern browsers now include a set of development tools allowing you to inspect various aspects of your HTML, CSS and scripting from within the browser itself. Nikita Vasilyev has now produced an extension for Chrome which allows changes to CSS and JS, made in the Chrome dev tools environment, to be automatically saved back into the source files. Excellent.

Installation is straightforward, if a little long-winded. Just follow the instructions. Addy Osmani’s produced a great walkthrough video and accompanying article. There are a few gotchas that might catch out the unwary or the uninitiated though.

  1. Don’t forget to click the ‘Install the Server’ link at the bottomof the ‘How To Install’ section.
  2. If you get errors about npm not being found during the server install (on Windows) then reboot your machine and try again.
  3. Once the server’s installed you need to run ‘autosave’ at a command prompt and this needs to be running whenever you want to autosave from the dev tools. You might want to start this automatically at boot up.
  4. If you’ve got a message in the command prompt after running ‘autosave’ saying something like Dev Tools Autosave 0.3.1 is listening on http://127.0.0.1:9104 then you should be all set.
  5. Note that the extension won’t save changes made to HTML files. So if you’ve got any inline CSS, changes made to it won’t be saved. Your CSS needs to be in an external .css file.
  6. If it seems to be setup OK but it’s still not saving, make sure you’re running the latest version of the extension. Go to chrome://extensions in your browser and check DevTools autosave is running at least version 1.1.1
  7. If you’re using SASS/SCSS/LESS for your CSS then obviously any changes you make to the CSS aren’t going to get ported back into the .sass/.scss/.less files.
  8. Finally, if you’re making quick experimental changes in the browser then keep in the back of your mind that you’re working on your CSS files and you’re busy overwriting their contents. Those quick ‘look-see’ changes you’re making are now persistent so it’s easy to lose stuff if you get too enthusiastic.

Changing The Default WordPress Image Sizes

When you upload an image to a WordPress media library, WordPress will create and store a variety of different sized copies of it, by default these are called thumbnail, medium, large and full size. When inserting an image into a post you can select which size you want to insert:

You can alter these default sizes from the admin panel under Settings; Media like this. However, if you’re developing a theme you might want to do this from within your theme’s code in order to ‘enforce’ specific sizes on your users without requiring them to edit admin settings. For example, suppose you’re wanting to maintain a vertical rhythm in your pages by using a fixed line-height in your CSS (e.g. 18px). In that case you’re likely to want your images to conform to that vertical rhythm as well by setting their height to be a multiple of 18px. You can do this by adding the following code to your functions.php:

update_option('thumbnail_size_w', 144);
update_option('thumbnail_size_h', 144);
update_option('medium_size_w', 288);
update_option('medium_size_h', 216);
update_option('large_size_w', 480);
update_option('large_size_h', 360);

In future, that will result in the following settings when you insert an image:

Note that this will not affect previously uploaded images; they’ll still retain the dimensions they were uploaded with. There are various plugins available to convert them to your new sizes though.

cars.net Logo

Here’s a logo I worked up for cars.net who recently ran a design competition for their new site branding. The brief was to provide a friendly and approachable image, suited to family purchasers. They wanted to use a custom font in black, and the logo was to incorporate an image of a car using a combination of blue and green to provide impact. Unfortunately my design was not chosen (you can see the winning design here) but I wanted to showcase it here for a couple of reasons.

Firstly, my personal view is that I produced a superior logo to the winner. However, that counts for nothing, and quite rightly so. Ultimately, the client makes the choices they want to make. They know their requirements better than their content producers. That’s not to say some clients’ design sensitivities aren’t in need of a little gentle calibration at times, but more often than not disagreements over the ‘correct’ choice are a matter of subjective, personal choice and in this case it’s the role of a designer to defer to the wishes of his client.

Secondly, although I still like the logo I designed, there are a couple of things I’d do to improve it. I’m happy with the cars themselves, but the font would benefit from being a heavier weight but a smaller size, to tie in more with the form of the cars’ tyres. I tried this at the time but didn’t like it then. I also tried to preserve the purity of shape for the letter forms. They’re very strictly cast on a circular geometry and while that works really well for the ‘cars’ part of the text, the ‘net’ section feels unbalanced and the letter ‘t’ appears leaning and crushed. With hindsight, I think I’d sacrifice some of the circularity for a better feel. The point here is that nothing we produce is ever perfect. Both the designer and the client should be prepared to revisit work at a later date as often it’s possible to spot potential improvements only after a period of time has elapsed. But having said that, it’s also important to strike a balance and to recognise when effort, and indeed money, can be best spent elsewhere.

Love Your Constraints For Better Design Skills

Introduction

There are two factors that go to making a good design; constraints and creativity. These two factors pull in opposing directions, with constraints limiting your available options and creativity increasing your options. Counter-intuitively, contraints are in many ways your friends and creativity is often the enemy. After all, there are infinitely many ways to creatively fill a blank page and only our constraints allow us to limit that infinity to the single product we deliver.

So what kinds of things constrain us? We usually have certain visual elements that need to be included, whether that be shape, text, composition, images or colour. We are aware of the perception or ‘feel’ that the client wants us to create in the product. By far the most powerful constraint available to us though is our own sense of taste and we’re all familiar with using this to limit what we produce.

These kinds of things are our high level constraints and they certainly help to limit the design space to more manageable proportions. We need to impose far more detailed constraints as we focus in on a few designs to present to the client though. Let’s look at the constraints I used to design my own logo. I’ll start with a brief summary of the top level constraints I set up for myself but I want to focus on the more fine-grained detail as that’s where people often struggle.

I’m a web designer. I don’t sell cars or houses and I’m not a dentist; all of which have obvious objects associated with them. Web design is more ephemeral. I’m not really an artist, I’m not really an engineer, I’m not really a programmer; all of whom have obvious tools associated with them. Web designers are a bit of all three which makes for a messy logo. I’ve never been a fan of things like the double-barreled, random-arbitrary, adjective-noun naming convention that blossomed in the dot-com boom of the back-end of last century; purple-tomato or quizzical-kangaroo make for obvious logos but they’re content-free. What I really wanted to showcase is the personal nature of my business and my clean, uncluttered and engineered design style. Mike Higginbottom is a good solid no-nonsense Northern name which is nothing if not memorable. So I went with that and that leads to the meat of this article: what can we do with the letters M and H?

Analysis of Form

Here’s a pairing of a nice simple uppercase M and H in all their glorious, huge point size Arial ubiquity. Just let them batter your eyes with their brutal forms for a moment, standing there like some typographic superheroes, all hands on hips.

Here’s a quick comparison. There’s nothing that’s not obvious here but it’s the recognition of these factors that provides our contraints.

  • Both are constructed of straight stems and bars. No soft curving bowls or shoulders here.
  • Both have rectangular, and potentially square, overall shapes.
  • Both have four very strongly defined corners.
  • Both have two strong vertical stems enclosing the counters of the letter forms.
  • Both are what we might call spiky, the M slightly more so than the H.
  • Both have a crossbar connecting the uprights and forming the main difference between the two letters.
  • The M has a two part diagonal crossbar, here filling the whole of the internal space.
  • The H has a horizontal crossbar, here set slightly above centre.
  • The H is substantially slimmer than the M.

OK, let’s look at them in lower case.

There are some obvious differences between the upper and lower case glyphs and similarities in the lower case:

  • We still have our very strong vertical main strokes.
  • There’s a strong emphasis in the verticals being on the left of the letter forms.
  • The crossbars are now much softer, curving shoulders.
  • The shoulders of both letters are much more similar in the lower case forms.
  • We have retained the spikiness at the baseline.
  • The letter h is almost exactly the same as the left half of the m, but with an ear rather than a full ascender.
  • The letter m has a repeated shoulder.

Letter Layout

So, let’s see what we can do with this information. Obviously we can play with the detailed form of the letters, but let’s start by considering their relationship to each other in space. We’re looking for MH rather than HM so we need to consider the preceived ordering of the letters; the M needs to appear either above or to the left of the H, or possible both. For the upper case letters we can generate things like the following:

None of these are particularly strong as they stand with the third perhaps looking the most promising for future development. The diagonal design does have the advantage of providing two white space corners at top right and bottom left which might be useful in some contexts so it shouldn’t be discounted entirely. But that’s what I’m going to do anyway.

Vertical Arrangement

The vertical design is pretty unappealing, essentially because of its tall and spindly nature, but it does have potential for further work. Here are a few basic structural variations on that theme, all of which involve finding ways to shrink the height and introduce some measure of compressed solidity. All of these really serve only as the basis for a more refined logo. The key here is that we’ve used the constraints listed above to focus our design effort onto a few structural forms worthy of exploration.

The first example works by thickening the strokes and bringing the crossbar’s lower apex of the M much higher up into the centre of the letter. The remaining three work in a similar way but they encapsulate the H within the body of the M, using the descending apex of the M to key into the top of the H. Notice how all these examples are very unpolished. Force yourself to focus on the structure by leaving the details unfinished.

Horizontal Arrangement

So, what do we get if we use a horizontal arrangement:

The first design uses the two outer stems to envelope the letters. The design in the top right introduces the idea of angling the stems but is, in itself, not very appealing. However, in combination with the idea of interleaving the two letters, it leads on to the bottom two structures which show more promise and are worth investigating further.

Lower Case Combinations

If we take the lower case letters we can exploit the obvious similarities in the structure of the loops to get the following two images. The second of the two merges the letters even more and has the advantage of providing symmetry which could be exploited to further refine the design. For example, removing the ear on the M and reversing the thinning on the left hand loop would provide a reflection about the central ascender stem.

Where to Go From Here

This article has presented some basic techniques for examining the structure of a small selection of letter forms. This is pretty mechanistic though and the art of design comes from adding a more intangible creativity to these basic technical techniques. For my own site, which uses a hexagonal motif throughout, I extended the basic uppercase horizontal arrangement by placing the letters on adjacent faces of an isometric representation of a cube. In 2D space this takes the form of a regular hexagon. Extruding the two letters backwards and allowing them to intersect gave the following logo:

If you want to have a play then feel free to take the above ideas as a baseline and polish them into useable designs. Alternatively grab another pair of letters and study them in a similar way.

Glow Effects – The When And The How

Back in the old days the canonical example of an over-used effect was the HTML <blink> tag. One of the top candidates today has to be the ‘glow effect’. Having said that, if used judisciously, it can be a very effective effect. So, when should you use it and how can you implement it?

When to Use a Glow

The short answer to this is rarely. There are some very specific instances when an obvious, in your face glow is appropriate. Scenes that naturally include a source of illumination are the obvious use case. Examples include space scenes, aurorae, fires and flames, bio-luminescence, glass objects, neon signs, sunlight through windows, water and ice.

More common, and often over-done, are glow effects in logos and lettering.

Perhaps the most common ‘correct’ usage would be in user interface elements such as glowing buttons etc.

Finally, glows are often employed to produce more abstract images.

How to Create a Glow in Photoshop

There are a thousand variations on a theme here but this should be enough of a recipe to get you started on the path to discovery.

  • Create a new layer and select it.
  • Use the Paint Bucket to fill it with black (#000000)
  • Select white as foreground color.
  • Select the Brush tool. Right-click anywhere on the image and set Master Diameter to 3px and Hardness to 100%.
  • Create a smooth curved path using the pen tool.
  • Right click the image, tick Simulate Pressure and select Stroke Path
  • Open the Paths window and click below the work path to deselect it.
  • Right click the layer and select Blending Options.
  • Tick Outer Glow and select it. Set an appropriate colour.