Better HN
topnewbestaskshowjobs
Log inSign up

csswizardry

913 karma · joined Apr 26, 2011 (15y ago) · 156 submissions

* Consultant Web Performance Engineer * Google Developer Expert * csswizardry.com * @csswizardry

![](https://csswizardry.com/img/css/masthead-small.jpg_ — csswizardry.at.hn

--- meet.hn/city/gb-Leeds

Socials: - csswizardry.at.hn - bsky.app/profile/csswizardry.com - github.com/csswizardry - instagram.com/csswizardry - linkedin.com/in/csswizardry - csswizardry.com - x.com/csswizardry ---

Submissions

comment 9y ago · link · parent

Literally just received an unsolicited LinkedIn email as I was reading your comment :(

comment 9y ago · link · parent

Hah, this is getting interesting. Would be more fun doing this over a beer, but…

> Let's assume a reasonable 8mbit connection and 50ms RTT.

This is a huge assumption; you’ll be neglecting almost all of your mobile users there. But! Optimise for your use-case, of course.

If you’re self hosting your fonts I would leave them external, `preload` them, and use the preferred `font-display` mechanism to deal with (or elimiante) FOUT and/or FOIT. That’s your extra connections taken care of, and we’ve moved fonts back off of the critical path :)

I think what we’ve both hit upon here is the fact that browsers need to decide on a standard way of handling FOUT/FOIT. Leaving pages blank for up to 3s (or in Safari’s case, indefinitely) would completely eliminate the need to try and circumvent it by base64 inlining :(

comment 9y ago · link · parent

If you’re talking about https://theandrewbailey.com/blog/ then your CSS with and without the base64 encoding looks like this:

  101K  9 Dec 18:30 with.css
   99K  9 Dec 18:31 with.min.css
   73K  9 Dec 18:31 with.min.css.gz
  6.8K  9 Dec 18:30 without.css
  5.2K  9 Dec 18:31 without.min.css
  1.8K  9 Dec 18:31 without.min.css.gz
Although this might be true:

> …72k, which is not much bigger than the CSS without the fonts + the fonts separately.

The issue here is that CSS is a render-blocking resource and fonts are not; ergo you’ve increased render-blocking assets from 1.8K to 73K, meaning the user has to download 4056% more bytes before they get to see anything at all. Base64 encoding assets is usually a huge anti-pattern. You’d be better off moving those fonts back out into separate requests.

I hope this comment is taken in the spirit it’s intended: I like making the internet fast :)

Have a great weekend!

(If you’re interested in further reading, look up anything to do with the critical rendering path.)

comment 12y ago · link · parent

You can actually enable a CSS-only hack[1] to avoid using the comments.

Using `display: inline-block;` allows you to manipulate grids with text-level properties (e.g. `text-align: center;` to cause grid items to fill out from the center of the row), and also allows you to use `vertical-align: [top|middle|bottom];` to cause columns to start from different, well, alignments.

[1] https://github.com/csswizardry/csswizardry-grids/blob/master...

comment 12y ago · link · parent

I came up with this (in relation to Bootstrap) in 2011: http://csswizardry.com/2011/08/building-better-grid-systems/

This then became the basis for CSS Wizardry Grids: http://csswizardry.com/2013/02/introducing-csswizardry-grids...

comment 12y ago · link · parent

I’ve been using Finch for quite a while now, and I absolutely love it. As a lot of people have pointed out, there are several alternatives and/or competitors. But, as @lachgr points out, Finch is very user-friendly, which—to a designery type like me—is invaluable.

comment 12y ago · link · parent

They’re headquartered in Amsterdam, not SF, but Booking.com are probably worth a mention. (They have offices globally.)

I was invited over to their HQ to give a talk late last year and wow. An amazing company, every employee has a huge smile and nothing but great things to say, they have a really great culture, are a very wealthy company, and engineers are given a lot of freedom. Had I not just started working for myself, I would have taken them up on the full-time jobs they offered me!

98.

CSSCV – format your CV like a CSS file(github.com ↗)

1 points · by csswizardry · 13y ago · 1 comment

comment 13y ago · link · parent

Relevant: Amazon’s $23,698,655.93 book about flies -- http://www.michaeleisen.org/blog/?p=358

comment 13y ago · link · parent

Hi!

> I enjoyed your talk on abstracting the grid into it's own layer by adding extra markup.

Thank you very much!

> I was wondering if you've read Grid Systems in Graphic Design?

I haven’t actually, but I’ve always fancied myself a copy. Recommended?

101.

Show HN: csswizardry-grids—Simple, ‘semantic’, nestable, responsive grid system(github.com ↗)

3 points · by csswizardry · 13y ago · 3 comments

comment 13y ago · link · parent

> Another recurrent problem is that links cannot be nested.

This bit piqued my interest, so I made this: https://bitly.com/13F3dIy

comment 13y ago · link · parent

Qualifying selectors like that is always a bad idea because:

1) What if you ever need to use the selector on a different element? 2) A performance hit (though so slight it might as well not matter) 3) Increased specificity

I have written a lot about CSS selectors:

http://csswizardry.com/2012/05/keep-your-css-selectors-short... http://csswizardry.com/2012/07/quasi-qualified-css-selectors... http://csswizardry.com/2012/07/shoot-to-kill-css-selector-in...

H

comment 13y ago · link · parent

Yep, I should probably add something to the article about this; browsers now are so fast that tests show little to no difference :)

comment 13y ago · link · parent

Hey, article author here :)

> A lot of great information here.

Thanks!

> …unless you've produced some kind of CSS monstrosity, your CSS isn't the bottleneck in your website performance.

You’re definitely right insofar as selector efficiency should be last on your list of things-to-make-my-site-faster. CSS as a whole, however, is a pretty significant performance concern; I wrote a little more about that here: http://csswizardry.com/2013/01/front-end-performance-for-web... </plug>

Cheers! H

106.

Responsive grid systems; a solution?(csswizardry.com ↗)

2 points · by csswizardry · 13y ago · discuss

comment 13y ago · link · parent

I do try and do this, really I do :) Right from the image spriting article:

> It is important to note that spriting images won’t always be necessary and/or possible. I’m not saying you should do it all the time, and I am saying you quite often can’t (fluid images, for example). It’s just another possible tool to put in your toolbox.

Any obvious exceptions to the rule – or any obvious contexts in which any advice would not work – I do try and mention.

comment 13y ago · link · parent

It’s a CSS thing, and not a fad… I wrote more about it here: http://csswizardry.com/2011/09/when-using-ids-can-be-a-pain-...

comment 13y ago · link · parent

> The article just read as if that idea was meant to carry over to the second example.

D’oh! I’ll try reword it when I get a chance :)

> I'll make a point of reading your other posts, they seem to be pretty interesting.

Cool, let’s hope they deliver!

Cheers for your feedback :)

comment 13y ago · link · parent

Hey, article author here!

The ‘away from the norm’ bit refers only to the first example:

> In the first case […] this is your context which is away from the norm.

It’s not always about the norm, but about differing context. In the second example the context is balancing performance and semantics. If your context is more concerned with brand image etc then that’s the difference (nothing to do with norms, really) :)

(I hope I worded that okay, it felt very clumsy!)

111.

Ask HN: *Absolute beginners* guide to JavaScript

1 points · by csswizardry · 13y ago · 3 comments

comment 14y ago · link · parent

We’re getting on it :D https://github.com/csswizardry/inuit.css/issues/67

comment 14y ago · link · parent

Just poking through the source; is there a reason for selectors like this?

    .metro .metro-sections .metro-section.tile-span-1
    
    #charms .charms-header a.win-command span.win-commandimage.win-commandring

comment 14y ago · link · parent

Broken it up! Thanks :)

https://github.com/csswizardry/inuit.css/blob/master/inuit.c...

comment 14y ago · link · parent

For a framework it might be a nicer option, so that you can drop a module by only deleting the include reference rather than permanently deleting dozens of lines. Perhaps. It’s largely down to taste I imagine :)

comment 14y ago · link · parent

I personally like working that way, but I think I might split it out so that dropping an object only takes deleting one line from a file and not dozens :)

comment 14y ago · link · parent

I was discussing wanting to build a decent framework with my ex, and I said it would be a ‘cool’ thing to do. A brief bit of word association to-and-fro and me being reminded of the lyric/phrase ‘Cooler than a polar bear’s toenails’ I/we arrived at Inuit :)

comment 14y ago · link · parent

Project creator here! If anyone has any questions then please fire away. This blog post may also shed some light on a few things: http://csswizardry.com/2012/09/inuit-css-v4-oocss-sass-and-m...

Cheers, H

119.

Show HN: inuit.css—lightweight, Sass-based, OOCSS framework(inuitcss.com ↗)

14 points · by csswizardry · 14y ago · 15 comments

123456