WTFCSS (mrmrs.github.io)

almost 4 years ago from , Product Designer

9 comments

  • Ryan RushingRyan Rushing, almost 4 years ago

    This is some intense pubic shaming.

    7 points
  • Bruno LazzaroBruno Lazzaro, almost 4 years ago (edited almost 4 years ago )

    http://mrmrs.github.io/rprtr/css/i.css

    Beacuse defining a class for each property/value in CSS is a great optimization.

    Also, look at the generated HTML:

    <header class="phl phx-l pts pbs bb-solid bw-1 bor--near-wht">

    Hmmm, i don't know. I wouldn't be shaming others with this.

    7 points
  • Shawn BorskyShawn Borsky, almost 4 years ago (edited almost 4 years ago )

    It precludes the idea of a production situation. I mean, they engage in iterative development and probably care more about shipping a good looking feature than how technically efficient their stylesheets are. Kind of a weird thing to shame them on.

    6 points
  • Aaron SagrayAaron Sagray, almost 4 years ago (edited almost 4 years ago )

    sigh. This really shows the warts that CSS has, vs. poor coding practices.

    • CSS has no native support for variables. We all know that. This is the core issue
    • Declaring a class for each visual style (aka .font-size-1em) is completely unmaintainable in a web application. Think of event management and dynamically adding/removing 10 classes from each object in the DOM.
    • SCSS and the like add support for variables... but will also result in larger stylesheets, but also nets increased coding efficiency.
    4 points
    • Andrew LiebchenAndrew Liebchen, almost 4 years ago

      Anyone who has to ship production code for an app understands that CSS "optimization" is a trade-off...or more correctly that optimization is between the development efficiency against compiled complexity.

      1 point
  • Giulio MichelonGiulio Michelon, almost 4 years ago

    Very cool, but font-family: "Comic Sans MS" is unforgivable in any website.

    0 points