Skip to content

Instantly share code, notes, and snippets.

View MathRivest's full-sized avatar

Mathieu Rivest MathRivest

  • Turo
  • Montreal, QC, Canada
  • 11:08 (UTC -04:00)
  • X @MathRivest
View GitHub Profile
@alekseykulikov
alekseykulikov / index.md
Last active April 14, 2024 00:32
Principles we use to write CSS for modern browsers

Recently CSS has got a lot of negativity. But I would like to defend it and show, that with good naming convention CSS works pretty well.

My 3 developers team has just developed React.js application with 7668 lines of CSS (and just 2 !important). During one year of development we had 0 issues with CSS. No refactoring typos, no style leaks, no performance problems, possibly, it is the most stable part of our application.

Here are main principles we use to write CSS for modern (IE11+) browsers:

@mikefowler
mikefowler / retina.scss
Created October 2, 2012 15:17
Compass mixin for handling retina images.
/**
* Bear in mind: this is NOT a way to address
* issues with bandwidth and sending large
* images to a mobile browser.
*
* For a great discussion of that, check out this A List Apart
* article by Dave Rupert: http://bit.ly/QGfJk4
*
* The media query is based on the snippet recently posted by Chris
* Coyier on CSS Tricks: http://bit.ly/QGg71V