Scott Vandehey's Blog
In this article, I’ll walk you through how to properly load your font files with @font-face in CSS to avoid the browser’s faux-italic and faux-bold styles.
You know that list of checkboxes on the theme settings page that let you turn on and off parts of the theme like the logo or slogan? Well, you can add your own options to that list really easily in Drupal 7. In D6, this was kind of a pain, because you had to write all sorts of functions to save and load your settings to the database and handle everything properly. In D7, that's all done through the Form API, so the heavy lifting is done for you. All you need to do is tell it to add some form fields, and what the new setting is called!
The annual Survey for People Who Make Websites from our friends at A List Apart has gone up, and I encourage you to take ten minutes to participate. This survey is the only source of information about our industry, and by taking it, you benefit us all. Here's what they have to say about it:
Alarmist rhetoric from news organizations about the web is nothing new, but today's front-page headline on the New York Times still caught my eye: "Web Code Offers New Ways to See What Users do Online." It's about HTML5 privacy risks, and it's a load of crap.
When the W3C started working on HTML again in 2007, they posted a set of guiding principles for the new version, emphasizing compatibility, utility and interoperability. I’d like to highlight four of these principles that I think are especially important.
Recently, twitter was buzzing with news of a CSS technique called
optimizeLegibility that enables better kerning and font ligatures. It's enabled by default in Firefox above 20px text, so you may have already seen it in action. I'd noticed the effect on my Talk Like Warren Ellis site (warning: possibly not safe for work language).
Like any Drupal themer, I've done my share of grumbling about the frequently ridiculous level of nested divs with dozens of classes. I'd heard some people mention a module called Semantic Views, but I never really understood what it was for until I found this video. If you don't understand what the big deal is either, take the four minutes to watch. It's a total "ah-ha!" moment.
Our new site design is live, so if you're reading this in a feed reader, please click on through! In a nutshell, we wanted to redesign to take advantage of Drupal 7, HTML5, and dramatically improve the readability and usability of the site as a whole.
I'm working on an HTML5 theme for Drupal 7 right now, and I needed to change the meta content-type tag. By default it looks like this:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />, and I needed the updated HTML5 version:
<meta charset="utf-8" />. Normally, you can replace these things in one of the theme template files, but in this case, the meta tag was hard-coded in the Drupal source code somewhere, so I needed a programmatic solution. Here's what I found for both Drupal 6 and 7.