Paul Irish
paulirish.com · Personal blog · on HN since 2009
Paul Irish, a web developer on the Chrome team, writes about front-end techniques, browser internals, and performance tips.
What HN saysHN links it for practical web tricks like protocol-relative URLs, FOUT, and WebKit internals, and commenters note he posts rarely now.
127HN people shared it
90linked it in comments
60stories submitted
1.6Kstory points
10 months agolast shared
2009people per year2026
Most-shared posts
- 1* { box-sizing: border-box } FTW16 people · 361 points · first shared 2012 · 85 comments on HN
- 2The protocol-relative URL16 people · 7 points · first shared 2010 · discussion on HN
- 310 Things I Learned from the jQuery Source10 people · 4 points · first shared 2010 · discussion on HN
- 4Fighting the font face fout10 people · first shared 2011
- 5The HTML5 Shiv (2011)8 people · 119 points · first shared 2011 · 16 comments on HN
- 6Making your HTML5 animations a little smoother.7 people · 5 points · first shared 2011 · discussion on HN
- 7WebKit for Developers6 people · 318 points · first shared 2013 · 36 comments on HN
- 8Why moving elements with translate() is better than pos:abs top/left6 people · 9 points · first shared 2012 · discussion on HN
- 9The Fundamentals, Primitives and History of HTML55 people · 71 points · first shared 2011 · 11 comments on HN
- 10An open source Flash runtime written in pure JavaScript with SVG5 people · 7 points · first shared 2010 · discussion on HN
- 1111 More Things I Learned from the jQuery Source5 people · 6 points · first shared 2011 · 1 comments on HN
- 12Browser Market Pollution: IE[x] is the new IE64 people · 296 points · first shared 2011 · 87 comments on HN
- 13Accessibility and developers4 people · 7 points · first shared 2012 · discussion on HN
- 14Conditional stylesheets vs CSS hacks4 people · 5 points · first shared 2009 · discussion on HN
- 15A Re-Introduction to the Chrome Developer Tools3 people · 18 points · first shared 2011 · discussion on HN
What HN people wrote when they linked it
beauHD · 2022-10-04
Paul Irish is a little quiet lately. He used to be very active on Twitter, but only posts sparingly now. Also his second last post is from 2018[0] with a three year gap between that and his latest post, which was last year. No post for 2022 yet. I always admired that guy, and still do.
He contributed a lot to the webdev scene. But the scene is saturated now with developers of the same Paul Irish caliber pushing out tonnes of brilliant stuff, it makes me wonder if it's hard to get noticed now, with the constant barrage of new webdev material & tutorials.
[0] https://www.paulirish.com/2018/raf-internals-and-node-debugging-guide/
jarofgreen · 2014-02-15
Anyone know a good reason why not? This seems like a great answer to the issue.
(I suppose you may get web page layouts "jumping" if the downloaded font had very different spacing to the fallback font. EDIT: Ah, just learnt this is called FOUT. http://www.paulirish.com/2009/fighting-the-font-face-fout/ Still, I'd personally prefer FOUT to being unable to read the page.)
zackboe · 2013-12-15
Paul Irish has compiled a list of "Web Browser, Frontend and Standards Feeds to Follow"
http://www.paulirish.com/2011/web-browser-frontend-and-standards-feeds…
benjiweber · 2013-04-09
Annoyingly there's an obnoxious popup on IE6 when doing this
http://paulirish.com/2010/the-protocol-relative-url/
Not using protocol relative urls causes a great amount of pain. Unfortunately when you're building content for third party pages you need more graceful degradation than focus stealing dialogues.
mikewest · 2013-04-03
Paul Irish has a great article outlining the technical background of this sort of inter-WebKit diversity: http://paulirish.com/2013/webkit-for-developers/
mitchellhislop · 2013-04-01
The followup is also fantastic: "11 More Things I Learned From the jQuery Source": http://paulirish.com/2011/11-more-things-i-learned-from-the-jquery-sou…
dbushell · 2013-03-31
jQuery animate (and any JS animation) iterates over CSS properties by updating an elements style attribute. Updating the DOM at this rate forces repaint/reflows and is rarely going to perform well.
CSS transitions/transforms let the browser render once on separate layers. The animation frames can then be composited faster (and accelerated on the GPU).
Paul Irish has a great demo: http://paulirish.com/2012/why-moving-elements-with-translate-is-better…
bmac · 2013-03-01
Paul Irish created a google reader feed of front-end blogs located here: http://paulirish.com/2011/web-browser-frontend-and-standards-feeds-to-…
bgarbiak · 2011-12-15
It's a great change not because of IE6 (which, most likely, won't be affected at all) but because of future versions of Internet Explorer. These are now supposed to be released annually, which could be a curse for developers if there was no automatic upgrade mechanism (see: http://paulirish.com/2011/browser-market-pollution-iex-is-the-new-ie6/… Today's decision of Microsoft means it will be a blessing. Basically, all of client side web-technologies will iterate a lot faster and in 2-3 years the vast majority of users will sport the newest version of a browser by default.
JoelMcCracken · 2011-11-28
It seems obvious to me that this would be how to implement this. When I read his initial code, I immediately wondered why he wasn't returning self.
Maybe this familiarity comes with having spent enough time reading through the jQuery internals. Speaking of which, if you like this article, the classic "10 things I learned from the jQuery source" is great reading:
http://paulirish.com/2010/10-things-i-learned-from-the-jquery-source/
masklinn · 2011-01-31
If you want to do that, I recommend starting by watching Paul Irish's "10 Things I Learned from the jQuery Source" [0] and "11 More Things I Learned from the jQuery Source" [1] as he does exactly that.
There's also jQuery Deconstructed [2] to navigate the jQuery source in... an interesting manner.
[0] http://paulirish.com/2010/10-things-i-learned-from-the-jquery-source/
[1] http://paulirish.com/2011/11-more-things-i-learned-from-the-jquery-sou…
[2] http://www.keyframesandcode.com/resources/javascript/deconstructed/jqu…
audionerd · 2009-07-24
The author recommends two ways to target rules at IE: 1) create new stylesheets for each version of IE, or 2) CSS hacks that only IE understand/ignores.
But I prefer to use a different approach: conditional classes on the body tag. For example:
<!--[if lt IE 7 ]> <body class="ie6"> <![endif]-->
<!--[if IE 7 ]> <body class="ie7"> <![endif]-->
<!--[if IE 8 ]> <body class="ie8"> <![endif]-->
<!--[if !IE]><!--> <body> <!--<![endif]-->
Then you can write IE-specific rules without CSS hacks:
body div#container { background-color: white; }
body.ie6 div#container { background-color: red; }
And all your related styles can be grouped together in the same file.
via http://paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-… and http://www.paulhammond.org/2008/10/conditional/
alwillis · 2023-04-26
> border-box is about layout, content-box about content. You should aim to design things around content, not layout: leave layout to the parent.
> border-box is incompatible with ratios: you need content-box there.
> border-box is only actually useful for things like making body fill the viewport.
I get the contrarian thing, but this doesn't make a whole lot of sense.
Both border-box and content-box are about content; it's just a matter what's included or not in the width of a box. Sure, there's some truth about what designers expected, but they weren't the only ones who were confused about how a box's border and padding changed how content worked…
There's a reason why virtually every widely-used CSS framework starts by changing content-box to border-box.
It's one of those issues that if we could go back in a Time Machine, content-box would have been the default; this is the next best thing:
html
{ box-sizing: border-box }
*, *::before, *::after
{ box-sizing: inherit }
References
From 2012, which started it all: https://www.paulirish.com/2012/box-sizing-border-box-ftw/
Developers are so psyched, border-box has a holiday: "International box-sizing Awareness Day"—https://css-tricks.com/international-box-sizing-awareness-day/
CSS Tricks almanac: https://css-tricks.com/almanac/properties/b/box-sizing/
franciscop · 2018-11-08
I'm the author of one of these independent CSS libraries that has been in the front page of HN several times. I normally use the libraries I write quite a lot, and it speeds things up for myself. This is mainly because of the deep knowledge I have for them, but if other people find them interesting so let it be.
Why would still make sense for skilled teams like yours? I can think several reasons:
- Prototyping: Probably not everything you do is detailed development and you might want to throw a quick prototype with not-too-bad styles. It won't be groundbreaking, but the ROI of using a CSS framework for those normally pays off.
- Cross-browser testing: an open source library will get bug reports from many varied places, and normally it's well tested cross-browser. Do you know about all of the flexbugs [1]? Do you even want to know? What about the 2012 trick of Paul Irish for box-sizing [2]? Did you know it was updated in 2014 and how awesome this update is?
- Documentation: when onboarding a new member on the team, if you are using one of the more popular libraries there is a large amount of documentation, github issues, stackoverflow questions and general articles on the web. While you might put the work to do this internally, even with great teams the internal documentation is normally very much worse than the OSS docs.
- Other topics such as accessibility (color contrasts, keyboard states, etc) are normally polished in the libraries. It's not free, it comes after bug…
igravious · 2016-03-08
Super! Just set up my first secure website with Nginx.
Absolutely simple. Literally the only way it could have been easier is if letsencrypt had been installed on my Centos 6.7 box but it was only a `git clone' away.
---
1) Stop the web server.
2) ./letsencrypt-auto certonly --standalone -d _my_domain1_ -d _my_domain2_ ...
At the curses prompt give it your contact email address, and accept the licence
3) Edit nginx.conf - Change all listen 80s to listen 443s. Add the following commands
ssl_certificate /etc/letsencrypt/live/_my_domain_/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/_my_domain_/privkey.pem;
# bump up protection
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
4) Start the web server
5) Doh! Go through website changing hardcoded http:// links to protocol (scheme) relative links // See here: https://www.paulirish.com/2010/the-protocol-relative-url/
6) Restart the web server
---
Ok. It's doesn't seem that simple now that I say it but it was easier than wrestling with Apache and rewrite rules :)
fat · 2012-12-11
hm… sorry it came off that way. :(
fwiw, the amount of technical things i've learned from working on bootstrap is not proportional to the amount of work i've put into this project… at all. But, i never expected it to be, and that's totally fine.
Have I learned any technical things? lol sure, of course!
Funnily, the accessibility thing you linked to wasn't really something I learned building bootstrap… the presentation was all about how accessibility is too hard to really learn… and you need to become a specialist, which is sad times. Paul Irish wrote a great post about it a while back: http://paulirish.com/2012/accessibility-and-developers/
maybe i learned that i knew nothing, but that was about it :P
My friend Dustin (who created this writing topic on medium) asked me to write about the single most important thing i learned from working on bootstrap.
And for me, that single thing was that I love working with people and hate working alone.
It took me a while to realize that what was bumming me out the most about running bootstrap (and other projects) was that as they became more successful, there was more of an expectation that i would be working on them all the time (which meant the expectation that i would be working on them independently/alone all the time).
That's ok from time to time, but isn't why I get excited about free software and ultimately i became pretty depressed/negative about the whole thing.
I'm just now starting to identify what makes we want to…
paulirish · 2012-04-25
This is a good thing, and there is basically no way around it.
There is a varying degree of a WebKit monoculture on mobile. Without great site compatibility, users will never successfully switch to a non-webkit browser, but currently much of the great mobile content out there assumes webkit prefixes and userAgent. So Opera, Mozilla, and MS basically need to adopt some of the mobile webkit properties in order to get compatibility, in order to get users. It's either that or advocacy wherein we try to get every site ever to not publish with just WebKit prefixes. But in reality, this advocacy effort has been underway already for over two years and we're still in this bad situation.
Look at the chart linked to from http://paulirish.com/2012/vendor-prefixes-are-not-developer-friendly/ When IE10 comes out (or it's complementary mobile browser), less than 25% of all sites that use CSS transitions will have them working in IE10.
Vendor prefixes are bad for us as developers and they're bad for browsers because it leads to situations like these. We'd be in a better situation without them.
BTW, one detail that wasn't really covered: I believe this change is localized to Opera's mobile browsers. Their desktop story is, I think, unchanged.
(All the above is a personal opinion and not that of my employer, yadda yadda)
tdupree · 2010-10-25
You don't have to use a service like Typekit to use a pretty webfont. The advantage Typekit has is that it gives you access to a lot of font choices to use (which you wouldn't otherwise have access to) and hosts/serves up the fonts for you.
Sites not using Typekit are most likely just using their own @font-face solution and hosting the fonts on their own server (which can also be a faster solution than loading in 3rd party font solutions).
Never use fonts and just hope a user might have it. It's not too hard to roll your own solution for serving up pretty fonts using @font-face. You will need to read up on it to learn the ins and outs, and what sort of goofy idiosyncrasies exits that you need to deal with.
I would recommend using the @font-face generator from fontsquirrel.com (http://www.fontsquirrel.com/fontface/generator). This helps you take a font you want to use and prepare it for the web, creating all the different font file types, as well as creating the css you need to use to embed the font for use.
When you use the font, be sure to use it as part of a font-family, so that you can plan what fonts to use as a fallback in case your @font-face declarations don't work out.
Understand that your font will be rendered differently between various browsers and operating systems. Sometimes using a css declaration like text-shadow (text-shadow: #FFF 0px 0px 1px;), and matching the text-shadow color to the background color the text is on, can help smooth out jaggies on…
cheeaun · 2025-12-29
Many years ago, IE requires `document.createElement`.
HTML5 Shiv was needed, with added history https://www.paulirish.com/2011/the-history-of-the-html5-shiv/ (2011)
zinekeller · 2025-11-10
border-box says hi [1]
[1]: https://www.paulirish.com/2012/box-sizing-border-box-ftw/
(Funnily, tables always default to border-box, so the objections in CSS standardization at the time is really silly.)
telesilla · 2023-12-01
No mention of the html5 shiv we all installed before any CSS so all browser quirks were removed?
https://paulirish.com/2011/the-history-of-the-html5-shiv/
myfonj · 2022-11-25
> site:.com inurl:"humans.txt" "the humans responsible & colophon"
That yields just "About 139 results". But searching for
inurl:humans.txt filetype:txt
[1] gives "About 2,030 results". Quite surprised seeing it somewhat adopted by Google and Netflix, but not exactly in the way proposed by the "standard".
https://www.google.com/humans.txt (Vague.)
https://www.netflix.com/humans.txt (Promotional misuse, probably.)
https://www.paulirish.com/humans.txt (Awww.)
[1] https://www.google.com/search?q=inurl:humans.txt+filetype:txt
mircea · 2021-10-12
That's a valid URL, AFAICT.
https://www.paulirish.com/2010/the-protocol-relative-url/
aphextron · 2020-04-15
Regardless of whether there is a reflow, translate() allows you to do subpixel animation [0]. It will always be smoother than animating CSS position [1].
[0] https://css-tricks.com/tale-of-animation-performance/
[1] https://www.paulirish.com/2012/why-moving-elements-with-translate-is-b…
TAForObvReasons · 2018-07-02
The html5shiv was originally based on a discovery by https://twitter.com/sjoerd_visscher and represents a iterative process involving many developers, at least according to Paul Irish https://www.paulirish.com/2011/the-history-of-the-html5-shiv/
Macha · 2017-09-03
There's a school of design thought that the FOUT (flash of unstyled text) is worse than delayed text loading so they hide the text and reveal it once the web font is loaded). Browsers even put in a default delay before using the fallback font to appease this point of view, but hacks to enforce it even on slow connections still exist from time to time.
https://www.paulirish.com/2009/fighting-the-font-face-fout/
(Personally I think it's insane, especially when many of these sites have ads which reshuffle content much more violently than any FOUT. Also now you have hacks to enforce the old behaviour: https://css-tricks.com/fout-foit-foft/ )
usaphp · 2017-06-27
Pretty simple actually, you have 3 images stacked on top of each other, then you track mouse movement and change absolute position of those images in relation to each other depending on mouse movement.
p.s. In this example they are changing margins and top/bottom/left/right positions, which is not really a good way to do it, a better way to it is using transform: translate(), it's less resource intensive and especially when you use translate3d. You can read more about the performance difference between using top/left/bottom/right and translate() : https://www.paulirish.com/2012/why-moving-elements-with-translate-is-b…
4lun · 2017-06-16
> I always had this issue that a div has standard border padding, and width:100% pushes its right to out of viewport.
You likely want `box-sizing: border-box`:
https://www.paulirish.com/2012/box-sizing-border-box-ftw/
chriscareycode · 2016-09-17
A good video from Paul Irish on the subject http://www.paulirish.com/2011/primitives-html5-video/
superchink · 2016-09-17
I think you're right.
http://www.paulirish.com/2010/the-protocol-relative-url/
This page outlines the original argument, as well as the updated reasoning that you suggest: always use HTTPS if it is available, even if requesting from a page served over HTTP.