aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/public/css/retina.less
diff options
context:
space:
mode:
authorDennis Eriksen <dennis.se@gmail.com>2013-04-24 22:06:38 +0200
committerDennis Eriksen <dennis.se@gmail.com>2013-04-24 22:06:38 +0200
commit7c836b53051f7874cd3a5832a0beb047ea9cdb8a (patch)
tree8032e2cf89a0965a400118be279cd237e31c2fc8 /public/css/retina.less
parentmargins corrected (diff)
downloadDivid-7c836b53051f7874cd3a5832a0beb047ea9cdb8a.tar.gz
added retinajs
Diffstat (limited to 'public/css/retina.less')
-rw-r--r--public/css/retina.less12
1 files changed, 12 insertions, 0 deletions
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