CSS reset considered evil

CSS resets are wrongly considered as a necessary part of any CSS template. After fixing a long series of WordPress themes that relied massively on this feature, I have to say that CSS resets are evil. More precisely, they're overused even when they're not necessary. Let me put it in this way: are we absolutely sure that all HTML elements must be reset? Are we absolutely sure that, in any circumstances and templates, we have to normalize the default rendering of all elements? Are we absolutely sure that all the default styles used by browsers on all elements need to be reduced to a lowest common denominator? Or, more properly, should we start rethinking the whole process behind normalization and realize that perhaps some default styles might be useful in some cases?

Alternatives to CSS hacks

The so-called "CSS hacks" are particular patterns used by authors to deliver style rules only to one browser or to prevent a browser from reading certain rules that might cause rendering problems. These patterns may rely on parsing bugs, wrong DOM implementations or syntactical constructs supported only by the targeted browser. Hacks may validate or not. In this article I'll review the most popular hacks used by authors, explaining why such patterns should be avoided and how one can actually target a browser by deploying other techniques.

The Book of CSS3

The Book of CSS3 is the most comprehensive and detailed guide ever written on the subject practically since the creation of this standard. I bought this book myself a couple of days ago and I have to say that I'm actually learning new things on CSS3. The author is Peter Gasston, one of the people behind CSS3.info. I'd like to explain why you should get this book.

CSS: fluid grid systems

I'm currently testing some of the recent and new possibilities offered by CSS grids and I have to say that I still haven't found what I'm looking for. Most of these grids are based on fixed sizes, meaning that the current base grid is made up of lengths measured in pixels. Pixels are a bad approach to CSS design because this approach actually doesn't take into account the problem of screen resolution. In fact, a 960 pixels grid system fails spectacularly on the most recent versions of PC and Mac monitors: simply put, it doesn't fill well the screen. A better approach is to use percentages. Let's see how.

Introduction to jQuery for CSS developers

Most CSS developers are simply afraid of jQuery and JavaScript in general. They think they have not enough programming skills to get to the bottom of it and write proficient and fluent code. Well, simply put, you're totally wrong. Before jumping to the wrong conclusions, you should get an overall idea of how jQuery and JavaScript work. You'll be probably very happy to find out that you can actually write your own scripts without having a degree in computer science. Don't you believe me? Well, let's see some examples.

CSS: best and bad practices in Wordpress theme development

One of my daily tasks as a developer is to modify the default styles which come along with a new Wordpress theme chosen by our clients. I have to say that this task is made harder and harder by some obtuse practices followed by many theme developers when it comes to CSS. I don't want to be rude because I love your work, but you should consider the fact that your styles may be changed by another developer or user, so you should code your CSS accordingly. Here are some of these bad practices that make me feel frustrated.

CSS: using @font-face

A couple of minutes ago I inserted the DejaVu Serif font on a Wordpress web site I'm working on. The main style sheet which makes use of the @font-face rule was downloaded from Font Squirrel together with the source fonts. There are four web fonts formats available: TTF, EOT, SVG and WOFF. At a first glance, the @font-face rule has been used several times to include all font variants. Each rule block takes care of inserting the specified variant using the four available formats. Let's take a look at these rules.