Handling pseudo selectors like :hover in SASS

SASS is an amazing CSS preprocessor that allows you to rapidly code websites using nested rules and variables and a lot more.

However, one thing the basic SASS instructions won’t tell you about is how to handle pseudo selectors when you’re nesting your rules. I’m talking about :hover, :before, :after and :visited states. Do you create a whole new CSS rule for a pseudo selector, or is there a way to nest them?

Continue reading “Handling pseudo selectors like :hover in SASS”

WordPress tip: Split up long posts into multiple pages

WordPress logoMany professional web publishers will opt to split up long posts into multiple pages: it breaks the article down into digestible chunks and also has the added benefit of reducing your site’s bounce rate and keeping readers on your site for longer. (Reducing the bounce rate of your website sends positive signals back to Google about the usefulness of your content.)

Continue reading “WordPress tip: Split up long posts into multiple pages”

iOS tip: Prevent font size scaling when device orientation changes

I’ve been messing around with mobile design this weekend. And among some of the mind-bending media queries and  cross device checking, I noticed that when I changed from portrait to landscape orientation on my iPhone, the font size seemed to scale up, upsetting the design.

After Googling around, as you do, I discovered a quick fix for this. It’s probably something that most mobile/responsive designers include as a matter of course these days, but simply adding this Webkit-specific line to your stylesheet fixes the awkward scaling issue when you rotate your phone screen:

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

Add the above to your existing body rules, and it’ll clear up orientation change weirdness.

Any other mobile design tips and tricks you want to share? Leave me a comment.

Why I ditched Drupal and came home to WordPress

Drupal LogoSorry Drupal, but it’s time we broke up. I’d like to say it’s not you, it’s me, but that would be lying. I’ve left you for the warm, comfortable, welcoming embrace of WordPress.

This blog has been running on Drupal since January 2007. I started it out on Drupal 5, and systematically upgraded through versions 6 and 7. As a content management system, I was intrigued by the possibility of having different content types on one site and theming them as I saw fit with a combination of Views and CSS.

Continue reading “Why I ditched Drupal and came home to WordPress”

My Drupal 6 to 7 Upgrade Process

Drupal 7 image

Oh, hello! If you’re reading this, it’s the first entry I’ve posted to my blog since upgrading the site to Drupal 7!

A major version upgrade like this isn’t something to be taken lightly. I’ve had to drop certain modules along the way and make a full backup of my site’s database and files. There’s a certain kind of anxiety one experiences when doing a major version Drupal upgrade, so I thought I would share my upgrade process with others. Other Drupal users are invited to share their experience and tips on upgrading at the end of the post!

Continue reading “My Drupal 6 to 7 Upgrade Process”

Drupal Question: How to theme a block created with views?

Drupal LogoTonight sees me writing a very frustrated Drupal post, but I’ve googled until my eyes went googly and I can’t see a solution.

So I turn to you, lovely people of Drupal Planet. I need your expertise and advice. And possibly a sample .tpl.php file…

Here’s my problem – I’m using views to create a block for the sidebar of my site. What I want to do is display a list of latest content showing the title of the post and an ImageField thumbnail. Examples of what I’m trying to achieve are on Daily Mail and Holy Moly – both on their right-hand sidebars.

Continue reading “Drupal Question: How to theme a block created with views?”

Drupal Howto: Use Modr8 and Modr8 Bypass to protect your site from spam

The 5 or 6 regular readers of this blog may remember that a while back our Unreality Shout site was attacked by spammers and pretty heavily vandalised. I asked for suggestions for workflow solutions that would prevent a repeat of this, but without making it harder for established members to post content.

Drupal LogoSome of you Drupallers kindly sparked off some great ideas, and after flirting with the Workflow module, I decided to go with Modr8 and Modr8 Bypass. Modr8 provides the basic functionality to hold back content from being published. Modr8 Bypass then gives you the ability to choose users (based on role) who should be allowed to bypass those rules and go straight to publishing their content.

Continue reading “Drupal Howto: Use Modr8 and Modr8 Bypass to protect your site from spam”