From 776a5c9f0e6e7928ccf9c1a0ba76655dda3c1f4a Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Tue, 22 Dec 2015 08:20:02 +0000 Subject: [PATCH] Cleanup LESS --- src/js/utils.js | 9 +++++++++ src/less/mobile.less | 11 ++++++++++ src/less/style.less | 48 +++++++++++++++++++++++++++++++------------- 3 files changed, 54 insertions(+), 14 deletions(-) create mode 100644 src/js/utils.js create mode 100644 src/less/mobile.less diff --git a/src/js/utils.js b/src/js/utils.js new file mode 100644 index 0000000..5809a69 --- /dev/null +++ b/src/js/utils.js @@ -0,0 +1,9 @@ +jQuery.fn.rotate = function(degrees) { + $(this).css({ + '-webkit-transform' : 'rotate('+ degrees +'deg)', + '-moz-transform' : 'rotate('+ degrees +'deg)', + '-ms-transform' : 'rotate('+ degrees +'deg)', + 'transform' : 'rotate('+ degrees +'deg)' + }); + return $(this); +}; diff --git a/src/less/mobile.less b/src/less/mobile.less new file mode 100644 index 0000000..7c5fb31 --- /dev/null +++ b/src/less/mobile.less @@ -0,0 +1,11 @@ +/* Mobile specific styles, mostly suggested by Cordova */ + +* { + -webkit-tap-highlight-color: rgba(0,0,0,0); +} + +body { + -webkit-touch-callout: none; + -webkit-text-size-adjust: none; + -webkit-user-select: none; +} diff --git a/src/less/style.less b/src/less/style.less index 5e69ecf..eb57667 100644 --- a/src/less/style.less +++ b/src/less/style.less @@ -5,23 +5,43 @@ // @import url(https://fonts.googleapis.com/css?family=Roboto:400,300,400italic,700); @import (inline) "node_modules/animate.css/animate.css"; -* { - -webkit-tap-highlight-color: rgba(0,0,0,0); /* make transparent link selection, adjust last value opacity 0 to 1.0 */ -} +@import 'mobile'; body { - -webkit-touch-callout: none; /* prevent callout to copy image, etc when tap to hold */ - -webkit-text-size-adjust: none; /* prevent webkit from resizing text to fit */ - -webkit-user-select: none; /* prevent copy paste, to allow, change 'none' to 'text' */ - background-color:#E4E4E4; - font-family: 'Roboto' sans-serif; - font-size:12px; - text-align: center; - height:100%; - margin:0px; - padding:7px; - width:100%; + background-color:#E4E4E4; + font-family: 'Roboto' sans-serif; + font-size:12px; + text-align: center; + height:100%; + margin:0px; + padding:7px; + width:100%; } +/* @group Overrides*/ +p { + a { + .transition(color 0.4s); + } +} + +ol , ul{ + font-size: inherit; + & > li { + font-size: inherit + } +} +/* @end Overrides*/ + +/* @group Functional Classes*/ + +a.no-color-change { + color: inherit; + &:hover { + color: inherit; + } +} + +/* @end Functional Classes*/ #main { height: 100vh;