Grow your CSS skills. Land your dream job.

Hacks for dealing with specificity 

The overall point here by Harry Roberts is to keep the specificity on your selectors as low as you can. The end result of that effort is:

  1. More reusable styles.
  2. When you need to override that style, you have opportunities to nudge that specificity a bit higher while still being reusable and not fighting yourself.

Authoring Critical Above-the-Fold CSS

The following is a guest post by Ben Edwards. I saw Ben tweet about a simple Sass @mixin that allowed you designate bits of CSS as being "critical" - the idea being to load that critical CSS first and defer the loading of the rest of the CSS until later. A clever idea, and one that is getting very popular in the web performance crowd. I thought I'd get Ben to introduce these ideas in more detail for us.

Read Article →

CSS Colorguard 

Clever work by Alex Sexton to analyze CSS and find colors that are so close to each other they should probably be combined. You know, for efficiency and consistency.

Finding/Fixing Unintended Body Overflow

Ughck, accidental horizontal scrollbar, amiright?

That can be a pain, but you can usually find the offending element by surfing around the ol' DevTools and selecting elements until you find something that extends too far over to to the right (off-page to the left doesn't tend to trigger a scrollbar the same way) and adjusting it.

Sometimes I use the "Delete Node" feature of DevTools to remove stuff from the page until the scrollbar goes away. …

Read Article →

Fixed Table Layouts

There is a CSS property for tables that, it seems to me, is well-supported, little known, and super useful. It changes the way that tables are rendered such that it gives you a sturdier, more predictable layout. …

Read Article →

#133: Figuring Out Responsive Images

I'm probably a bit rare in that I rather enjoyed trying to keep up on the responsive images thing. It's an interesting problem that bred lots of interesting solutions. The whole thing is starting to wrap up now though, now that the official solutions are:

  1. <picture> and friends
  2. <img> with srcset and sizes

The problem is: I don't really get it. I thought the original picturefill was pretty simple. List a bunch of sources with media queries. First one to …

Watch Video →

More Blog Posts →

*May or may not contain any actual "CSS" or "Tricks".