from Hacker News

2014 CSS Report: Examining how CSS is being used in the wild

by andrewbaron on 1/8/15, 5:12 PM with 21 comments

  • by mrdrozdov on 1/8/15, 6:59 PM

    Highest z-index was an astonishing 999999999999999999999999999 or 9.99e26. With a default key repeat on OS X, this would take 3 seconds of holding down 9 to type. If you took that many pieces of paper at .05mm thick, the stack would reach from Earth to the Sun 10 trillion times. The worst part about this large of a z-index is that a number that high will overflow and not work in the expected manner anyhow. The lowest was a more reasonable -999999.​

    FWIW, ​max z-index that is cross-browser safe is: 16777271

  • by leeoniya on 1/8/15, 7:01 PM

    imo, flex-box and evangelism of box-sizing border-box have been the best things since CSS3 selectors and transforms/transitions.

    i only wish that <col> elements could propagate style rules as if they were parents of all the related td/th cells. there's still no way to specify text-align and font-* on entire columns easily, which is just silly.

  • by nevir on 1/8/15, 7:02 PM

    Also see Chrome's statistics on CSS (and other web tech) usage: https://www.chromestatus.com/metrics/css/popularity
  • by andrewbaron on 1/8/15, 7:12 PM

    Out of 79 valid style properties (not counting vendor prefixes) the author found 372 in use. ¯\_(ツ)_/¯
  • by WhitneyLand on 1/8/15, 9:08 PM

    I wish Apple would add a SASS/CSS compiler into XCode for native UI. I know there are a couple side projects for this but if it were baked in it could really take off.

    Besides the potential of sharing across platforms, it would be one less system for layout and styles that had to be learned.

  • by freshyill on 1/8/15, 10:00 PM

    A few things that stuck out:

    * `content` is in the top 5 properties?

    * Glad to see nobody else uses two colons on pseudo selectors.

    * I can't believe how rare rgb color usage is! 0.4%? hsl I can believe.

    * I'd be interested to see how many sites use `!important` (the correct number in a style sheet is zero).

  • by AlexMcP on 1/8/15, 9:45 PM

    Hey OP here, I still have the data around if anyone has further questions to investigate.