aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/public/css
diff options
context:
space:
mode:
Diffstat (limited to 'public/css')
-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