From f3cd9b6cd030ecba13b6ed90191301e9dcd7e724 Mon Sep 17 00:00:00 2001 From: Max Lynch Date: Tue, 3 Sep 2013 11:41:52 -0500 Subject: [PATCH] Messing with bars --- dist/ionic.css | 16 +++++++++++++++- example/headers.html | 8 ++++++++ example/toderp/index.html | 3 ++- scss/ionic/_mixins.scss | 7 +++++++ scss/ionic/structure/_bar.scss | 9 +++++++++ scss/ionic/structure/_base.scss | 2 ++ 6 files changed, 43 insertions(+), 2 deletions(-) diff --git a/dist/ionic.css b/dist/ionic.css index 81f4e10e8b..7cf8c82683 100644 --- a/dist/ionic.css +++ b/dist/ionic.css @@ -6,7 +6,11 @@ html { -webkit-text-size-adjust: 100%; - -ms-text-size-adjust: 100%; } + -ms-text-size-adjust: 100%; + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: -moz-none; + user-select: none; } body { position: fixed; @@ -81,6 +85,10 @@ ul { margin-top: 5px; } .bar { + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: -moz-none; + user-select: none; position: fixed; right: 0; left: 0; @@ -138,6 +146,12 @@ ul { .bar-tabs { padding: 0; } +.bar-header-secondary { + top: 44px; } + +.bar-footer-secondary { + bottom: 44px; } + /* Pad top/bottom of content so it doesn't hide behind .bar-title and .bar-tab. Note: For these to work, content must come after both bars in the markup */ .has-header { diff --git a/example/headers.html b/example/headers.html index a8e61ddb22..7e0bd7a57b 100644 --- a/example/headers.html +++ b/example/headers.html @@ -23,6 +23,14 @@ Forward +
+ +

Content element must have "has-header" as a classname.

diff --git a/example/toderp/index.html b/example/toderp/index.html index b068752750..8bcd5bcf64 100644 --- a/example/toderp/index.html +++ b/example/toderp/index.html @@ -45,7 +45,8 @@ diff --git a/scss/ionic/_mixins.scss b/scss/ionic/_mixins.scss index 4252db14c7..6388216c44 100644 --- a/scss/ionic/_mixins.scss +++ b/scss/ionic/_mixins.scss @@ -377,6 +377,13 @@ user-select: $select; } +@mixin disable-user-select() { + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: -moz-none; + user-select: none; +} + // Resize anything @mixin resizable($direction) { resize: $direction; // Options: horizontal, vertical, both diff --git a/scss/ionic/structure/_bar.scss b/scss/ionic/structure/_bar.scss index 3942385382..5385753a3c 100644 --- a/scss/ionic/structure/_bar.scss +++ b/scss/ionic/structure/_bar.scss @@ -1,6 +1,8 @@ // Use Flexbox for our header and footer bars .bar { + @include disable-user-select(); + position: fixed; right: 0; left: 0; @@ -89,6 +91,13 @@ padding: 0; } +.bar-header-secondary { + top: $barHeight; +} +.bar-footer-secondary { + bottom: $barHeight; +} + /* Pad top/bottom of content so it doesn't hide behind .bar-title and .bar-tab. Note: For these to work, content must come after both bars in the markup */ .has-header { diff --git a/scss/ionic/structure/_base.scss b/scss/ionic/structure/_base.scss index 39b577ae45..b18fd5e08c 100644 --- a/scss/ionic/structure/_base.scss +++ b/scss/ionic/structure/_base.scss @@ -10,6 +10,8 @@ html { -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; + + @include disable-user-select(); } body {