From ebd88a25d9475c497c59d5e9a6ad391c150997cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Rohde?= Date: Sun, 17 Feb 2013 18:35:58 -0800 Subject: [PATCH 1/3] added mobile mixin --- lib/nib/mobile.styl | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 lib/nib/mobile.styl diff --git a/lib/nib/mobile.styl b/lib/nib/mobile.styl new file mode 100644 index 00000000..df71d514 --- /dev/null +++ b/lib/nib/mobile.styl @@ -0,0 +1,12 @@ +reset-webkit() + -webkit-touch-callout none + -webkit-user-drag none + -webkit-tap-highlight-color rgba(0,0,0,0) + +// use inside of html tag +mobile-html() + height 100% + font-size 100% + text-size-adjust(100%) + user-select(none) + reset-webkit() \ No newline at end of file From c6fac89701c28e9a2da34d88775d4049ccab301d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Rohde?= Date: Sun, 17 Feb 2013 18:46:25 -0800 Subject: [PATCH 2/3] added test case for mobile-html() --- test/cases/mobile.css | 14 ++++++++++++++ test/cases/mobile.styl | 5 +++++ 2 files changed, 19 insertions(+) create mode 100644 test/cases/mobile.css create mode 100644 test/cases/mobile.styl diff --git a/test/cases/mobile.css b/test/cases/mobile.css new file mode 100644 index 00000000..56bf6191 --- /dev/null +++ b/test/cases/mobile.css @@ -0,0 +1,14 @@ +html { + height: 100%; + font-size: 100%; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; + text-size-adjust: 100%; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + -webkit-touch-callout: none; + -webkit-user-drag: none; + -webkit-tap-highlight-color: rgba(0,0,0,0); +} \ No newline at end of file diff --git a/test/cases/mobile.styl b/test/cases/mobile.styl new file mode 100644 index 00000000..4a8bbfd4 --- /dev/null +++ b/test/cases/mobile.styl @@ -0,0 +1,5 @@ +@import 'nib/mobile' +@import 'nib/vendor' + +html + mobile-html() \ No newline at end of file From 3a787e83c8c72ca500119a85406736ad4b0bdcd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Rohde?= Date: Tue, 28 May 2013 18:34:14 -0700 Subject: [PATCH 3/3] renamed function to reset-mobile-webkit which fits better --- lib/nib/mobile.styl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/nib/mobile.styl b/lib/nib/mobile.styl index df71d514..a513e36a 100644 --- a/lib/nib/mobile.styl +++ b/lib/nib/mobile.styl @@ -1,4 +1,4 @@ -reset-webkit() +reset-mobile-webkit() -webkit-touch-callout none -webkit-user-drag none -webkit-tap-highlight-color rgba(0,0,0,0) @@ -9,4 +9,4 @@ mobile-html() font-size 100% text-size-adjust(100%) user-select(none) - reset-webkit() \ No newline at end of file + reset-mobile-webkit() \ No newline at end of file