Skip to content

Instantly share code, notes, and snippets.

View alexdahl's full-sized avatar
🏝️

Alex Dahl alexdahl

🏝️
View GitHub Profile

Keybase proof

I hereby claim:

  • I am alexdahl on github.
  • I am alexdahl (https://keybase.io/alexdahl) on keybase.
  • I have a public key ASCcxO1eiiG5RBBfHeRvlsTX7n4PHC_q8hNe1XxJ4YlxLQo

To claim this, I am signing this object:

@alexdahl
alexdahl / reusable-high-dpi.less
Created October 29, 2013 00:43
A simple LESS approach for a reusable high-DPI media query.
@highDPI: ~"only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 1.5dppx)";
div {
background-image: url('1x.png');
@media @highDPI {
background-image: url('2x.png');
background-size: 100px 100px; /* The original 1x dimensions. */
}
}