From 7c836b53051f7874cd3a5832a0beb047ea9cdb8a Mon Sep 17 00:00:00 2001 From: Dennis Eriksen Date: Wed, 24 Apr 2013 22:06:38 +0200 Subject: added retinajs --- public/css/retina.less | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 public/css/retina.less (limited to 'public/css/retina.less') diff --git a/public/css/retina.less b/public/css/retina.less new file mode 100644 index 0000000..5de0722 --- /dev/null +++ b/public/css/retina.less @@ -0,0 +1,12 @@ +// retina.less +// A helper mixin for applying high-resolution background images (http://www.retinajs.com) + +.at2x(@path, @w: auto, @h: auto) { + background-image: url(@path); + @at2x_path: ~`"@{path}".split('.').slice(0, "@{path}".split('.').length - 1).join(".") + "@2x" + "." + "@{path}".split('.')["@{path}".split('.').length - 1]`; + + @media all and (-webkit-min-device-pixel-ratio : 1.5) { + background-image: url(@at2x_path); + background-size: @w @h; + } +} \ No newline at end of file -- cgit v1.2.3