Skip to content
HomeVideosBooks
AllTopicsTrends
BlogsPodcasts
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
    Cover of Cascading Style Sheets

    Cascading Style Sheets

    Eric A. Meyer, Estelle Weyl

    Web & InternetProgrammingComputer Science
    Open LibraryAmazon
    Stats for nerds
    2recommend
    2mentions
    2people
    2009–2013years
    100% recommend

    Mentions per year

    20092010201120122013

    What Hacker News says

    1. omnicognateNov 2013
      Hi, I wrote this article (the response, not the original). though I didn't post it here - I just noticed the pingback email.

      I am indeed responding mainly to the wording, and you'll see at the start and end of the article statements that I think the original author does at least kind of understand what is going on (though I don't think his understanding is very solid).

      Your statement that 'the css unit "px" has no relationship to the actual size of a pixel on the screen' exemplifies why I am concerned about the wording and thought it necessary to write a response. This statement is just not true!

      The CSS px unit was carefully designed to embody as closely as possible the intuitive concept of a "monitor pixel", while retaining sufficient flexibility to allow implementors to accommodate a wide range of devices. The whole concept of unit anchoring was invented to support this. To pretend the px unit has no relationship to actual pixels is to waste all of this work.(*)

      I would suggest people aim for one of two levels of understanding:

      1. Really understand the rules. Read the standard, and/or a proper CSS book like "Cascading Style Sheets: The Definitive Guide" by Eric Meyer. Be an expert and design with confidence.

      2. Altenatively, just think of 1px as a monitor pixel. The standards authors put a lot of effort in to allow people to do so.

      For people that are currently in state 2 and are uneasy about retina displays, printers and the rest, my advice would be that they are going to need to go to state 1. It's not that hard. Just getting a vague idea (as many people are) that "px" is angular, or worse that it's in some way "unreliable", is not going to help anyone.

      [PS. Here's an ironic aside about the lengths people have gone to to make 1px correspond as closely as possible to a real pixel: As you say, 'marking a button as "width: 1cm" will almost never render something over 1cm of the screen geometry'. But why exactly is this? It's because the whole system of units has been anchored to the screen pixel size (or a simple multiple or fraction of it). On a printer, where there is no "pixel" worth anchoring to, the units are typically anchored to physical units, and width: 1cm really does mean 1cm. The reason that on your monitor screen 1cm is not 1 real cm is because your browser is resizing everything - it's bending over backwards to make 1px match the screen pixel size! (or a simple multiple or fraction yadda yadda yadda...)]

      thread
    2. willwagnerApr 2009
      I think you mean Eric Meyer and the book Cascading Style Sheets, The Definitive Guide (http://meyerweb.com/eric/books/css-tdg/). I really like this book and highly recommmend it.

      It hasn't converted me into a CSS fanatic, but it has helped me learn the tech and write better CSS when needed.

      thread

    Related

    Cover of CSS
    2009–2025

    CSS

    Eric A. Meyer
    4 recommend · 9
    Cover of A pattern language
    2007–2026

    A pattern language

    Christopher Alexander
    110 recommend · 368
    Cover of Design Patterns
    2007–2026

    Design Patterns

    Erich Gamma
    95 recommend · 491
    Cover of Pro CSS and HTML Design Patterns
    2011–2020

    Pro CSS and HTML Design Patterns

    Michael Bowers
    2 recommend · 2
    Cover of The Elements of Typographic Style
    2007–2026

    The Elements of Typographic Style

    Robert Bringhurst
    85 recommend · 157
    Cover of Head First design patterns
    2008–2025

    Head First design patterns

    Eric Freeman
    65 recommend · 109
    Cover of CSS secrets
    2015–2021

    CSS secrets

    Lea Verou
    11 recommend · 13
    Cover of The elements of programming style
    2008–2026

    The elements of programming style

    Brian W. Kernighan
    30 recommend · 96