Skip to content
HomeVideosBooksBlogs
AllTop postsTopics
Podcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K

    Philip Walton

    philipwalton.com · Personal blog · on HN since 2013

    Philip Walton, a web developer, writes about CSS, JavaScript modules, caching, browser behavior, and Google Analytics setup.

    Visit blogRSSHN submissions
    Web DevelopmentProgramming
    What HN says

    HN commenters link his posts on cascading cache invalidation, z-index, and analytics setup, and discuss them as practical references for web performance and deployment.

    Stats for nerds
    105HN people shared it
    92linked in comments
    3Kstory points
    Jun 2025last shared
    2013people per year2025

    Top posts on HN

    1. 1
      Solved by Flexbox
      17 people · 953 points · first shared 2013 · 123 comments on HN
    2. 2
      The Google Analytics Setup I Use on Every Site I Build
      6 people · 503 points · first shared 2017 · 99 comments on HN
    3. 3
      What No One Told You About Z-Index
      11 people · 433 points · first shared 2013 · 96 comments on HN
    4. 4
      Idle Until Urgent
      1 person · 295 points · first shared 2018 · 83 comments on HN
    5. 5
      Deploying ES2015+ Code in Production Today
      7 people · 198 points · first shared 2017 · 25 comments on HN
    6. 6
      Sticky Footer
      6 people · 156 points · first shared 2014 · 30 comments on HN
    7. 7
      Why I'm Excited About Native CSS Variables
      1 person · 129 points · first shared 2015 · 31 comments on HN
    8. 8
      My challenge to the web performance community
      2 people · 67 points · first shared 2021 · 54 comments on HN
    9. 9
      Instead of tracking page loads, track how many times it was viewed (2017)
      4 people · 47 points · first shared 2017 · 5 comments on HN
    10. 10
      Do We Need Specificity in CSS? (2015)
      2 people · 45 points · first shared 2015 · 48 comments on HN

    What HN people wrote when they linked it

    • e12eJan 2017

      > for what I'm doing (a pretty complex web app with an almost desktop-style GUI with a bunch of buttons, text inputs and checkboxes everywhere)

      Right. There's different contexts between an application an a (hyper)text document.

      What's good semantic markup for one, will generally be bad for the other.

      It's admirable (and desirable) to strive for adaptive layout and accessibility in applications - but they need a different type of framework than documents made for browsers. The browsers straddle this divide rather uncomfortably - being in part hypertext document browsers, and in part virtual machines for running general applications.

      Approaches like web components[1] might help us move toward a standardised reality for "applications that happen to run in the browser", while css and html are still (more and more anachronistically) (hypertext) document markup and layout tools.

      If you want to make a Web page/site (like alistapart.com) that's great. Swim with the current and draw inspiration from stuff like css zen garden[2]. With flex box, you can burn[4] most of the old complicated grid layout stuff, and comparatively easily make great sites.

      That doesn't really help if you're a "front-end developer" making "apps" though. Even the few that make an effort to color within the lines are still fighting the browsers and the standard, trying to fit a code-on-demand app into a REST shoe[3].

      [1] https://www.webcomponents.org/

      [2]…

    • technojunkieAug 2016

      When you fork a Github project, you'll have to examine the code to see what it's doing and how.

      With HTML and CSS, it's mostly visual but you can find improvements on semantics or simplifying what's there. If you can improve performance by rewriting a javascript function into CSS, such as animations, submit a pull request with your suggestions.

      With Javascript, look for bugs and improve the code that's written. Javascript easily becomes a mess and is often referred to as spaghetti code when it becomes hard to manage.

      Overall, look for ways to simplify the code, even if it means more code overall although usually it means less code.
      Two examples:

      https://philipwalton.com/articles/untangling-deeply-nested-promise-chains/

      http://www.heydonworks.com/article/on-writing-less-damn-code

    • paulojreisOct 2015

      Bear in mind that BEM (CSS-wise) is just a nomenclature. What it addresses is exactly excessive nesting and dependence between mark-up and styling.

      It roughly means that you imply structure via naming conventions instead of nesting (e.g. if you have a box inside a block, you'd style it via single class such as .my-block__my-box, instead of the traditional nesting approach .my-block .my-box). You can - and should - still use SASS (or other preprocessor) with BEM.

      Some interesting resources regarding this:

      http://philipwalton.com/articles/css-architecture/

      http://philipwalton.com/articles/side-effects-in-css/

      http://philipwalton.com/articles/extending-styles/

      http://benfrain.com/the-ten-commandments-of-sane-style-sheets/

    • masklinnNov 2013

      > But the big fixes to layout have been harder to specify and agree upon. They've been in the works for many years, but it's taken a while to figure out how they really should work, and which parts should be fundamental. It looks like it's getting a lot closer; the CSS Grid Module

      Although lower-level and not as modular, flexbox can already be used with great success for a number of layout sections (media objects, vertical centering, input inserts) or full layouts ("holy grail", sticky footers and grids): http://philipwalton.github.io/solved-by-flexbox/

      Flexbox is a CR, and it's starting to get pretty well supported: http://caniuse.com/#feat=flexbox

    • jrochkind1May 2021

      This lets you provide an implementation for a CSS feature that is perhaps not yet implemented by browsers, or maybe never will be.

      You could always do this with Javascript, and some people have been. See: https://philipwalton.github.io/polyfill/

      But this lets you do it in a less hacky, and especially, more performant way.

      The author of that JS CSS polyfill library above actually wrote in 2016 how that approach was proving a bad idea, and the right way to do this was the houdini API... I guess we've been waiting for it since 2016? This is the first I had heard of it. https://philipwalton.com/articles/the-dark-side-of-polyfilling-css/

    • joshribakoffJul 2015

      I like how he explains separating layout from presentation. When writing the layout code, keep in mind how its coupled to the HTML.

      This link mentions how "layout" like z-index is coupled to the structure of HTML, because nesting elements creates new stacking contexts (Z-index is hierarchical - an element's z-index only controls it's depth within the current context, not the overall document).
      http://philipwalton.com/articles/what-no-one-told-you-about-z-index/

      This one advises using "js" prefixed classes for JS, so the JS is only coupled to the HTML & not the CSS:
      http://philipwalton.com/articles/decoupling-html-css-and-javascript/

    Related

    Harry Robertscsswizardry.com140 people

    Little Things I Like to Do with Git

    Harry Roberts
    Personal · last shared 2026
    Philip Greenspunphilip.greenspun.com421 people

    How to Become as Rich as Bill Gates

    Philip Greenspun
    Personal · last shared 2026
    Patrick Waltonpcwalton.github.io53 people

    Pathfinder, a fast GPU-based font rasterizer in Rust

    Patrick Walton
    Personal · last shared 2025
    Raymond Camdenraymondcamden.com34 people

    How I Cheated Mozilla's New HTML5 Game - Browser Quest

    Raymond Camden
    Personal · last shared 2026
    Trent Waltontrentwalton.com30 people

    Hover on iPhone/iPad

    Trent Walton
    Personal · last shared 2015
    Performance Calendarcalendar.perfplanet.com123 people

    HTML and CSS techniques to reduce your JavaScript

    Performance Calendar
    Publication · last shared 2026
    Ian Bickingblog.ianbicking.org107 people

    Firefox Was Always Enough

    Ian Bicking
    Personal · last shared 2026
    Alex Russellinfrequently.org165 people

    If not React, then what?

    Alex Russell
    Personal · last shared 2026