From 0fc1731b1d0bb1f1e9c09475f85702a7d4da6aa5 Mon Sep 17 00:00:00 2001 From: Max Lynch Date: Wed, 6 Nov 2013 20:49:15 -0600 Subject: [PATCH] Fixed #84 - side menu shadow --- dist/css/ionic.css | 31 ++++++++++--------- dist/js/ionic-angular.js | 2 ++ js/ext/angular/src/directive/ionicSideMenu.js | 2 ++ scss/ionic/_menu.scss | 4 +++ scss/ionic/_scaffolding.scss | 1 + scss/ionic/_variables.scss | 2 ++ 6 files changed, 28 insertions(+), 14 deletions(-) diff --git a/dist/css/ionic.css b/dist/css/ionic.css index 7b218cd0a2..1c37f9f594 100644 --- a/dist/css/ionic.css +++ b/dist/css/ionic.css @@ -2013,7 +2013,7 @@ sub { fieldset { margin: 0 2px; padding: 0.35em 0.625em 0.75em; - border: 1px solid silver; } + border: 1px solid #c0c0c0; } /** * 1. Correct `color` not being inherited in IE 8/9. @@ -2359,13 +2359,13 @@ address { font-style: normal; line-height: 1.42857; } -a.subdued‎ { +a.subduedΓÇÄ { padding-right: 10px; color: #555555; text-decoration: none; } - a.subdued‎:hover { + a.subduedΓÇÄ:hover { text-decoration: none; } - a.subdued‎:last-child { + a.subduedΓÇÄ:last-child { padding-right: 0; } .action-sheet { @@ -2858,6 +2858,9 @@ a.subdued‎ { background-color: #fff; -webkit-overflow-scrolling: touch; } +.menu-content { + box-shadow: -1px 0px 3px rgba(0, 0, 0, 0.2), 1px 0px 3px rgba(0, 0, 0, 0.2); } + .menu-left { left: 0; } @@ -3662,7 +3665,7 @@ input[type="file"] { line-height: 34px; } select { - border: 1px solid #cccccc; + border: 1px solid #ccc; background-color: white; } select[multiple], @@ -3717,7 +3720,7 @@ input[type="checkbox"][readonly] { border-radius: 50%; background: white; content: ' '; - transition: background-color 0.1s ease-in-out; } + transition: background-color .1s ease-in-out; } /* the checkmark within the box */ .checkbox input:after { @@ -3732,7 +3735,7 @@ input[type="checkbox"][readonly] { border-right: 0; content: ' '; opacity: 0; - transition: opacity 0.05s ease-in-out; + transition: opacity .05s ease-in-out; -webkit-transform: rotate(-45deg); transform: rotate(-45deg); } @@ -4148,7 +4151,7 @@ input[type="range"] { .button-icon:active, .button-icon.active { background: none; box-shadow: none; - text-shadow: 0px 0px 10px white; } + text-shadow: 0px 0px 10px #fff; } .padding > .button.block:first-child { margin-top: 0; } @@ -4762,9 +4765,9 @@ a.button { line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; - -webkit-animation: spin 0.75s linear infinite; - -moz-animation: spin 0.75s linear infinite; - animation: spin 0.75s linear infinite; } + -webkit-animation: spin .75s linear infinite; + -moz-animation: spin .75s linear infinite; + animation: spin .75s linear infinite; } .ion-loading:before { content: "\e144"; } @@ -4777,9 +4780,9 @@ a.button { line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; - -webkit-animation: spin 0.75s linear infinite; - -moz-animation: spin 0.75s linear infinite; - animation: spin 0.75s linear infinite; } + -webkit-animation: spin .75s linear infinite; + -moz-animation: spin .75s linear infinite; + animation: spin .75s linear infinite; } .ion-refreshing:before { content: "\e144"; } diff --git a/dist/js/ionic-angular.js b/dist/js/ionic-angular.js index 1c010bf67d..92040907e2 100644 --- a/dist/js/ionic-angular.js +++ b/dist/js/ionic-angular.js @@ -1028,6 +1028,8 @@ angular.module('ionic.ui.sideMenu', ['ionic.service.gesture']) compile: function(element, attr, transclude) { return function($scope, $element, $attr, sideMenuCtrl) { + $element.addClass('menu-content'); + Gesture.on('drag', function(e) { sideMenuCtrl._handleDrag(e); }, $element[0]); diff --git a/js/ext/angular/src/directive/ionicSideMenu.js b/js/ext/angular/src/directive/ionicSideMenu.js index a465d629ac..6eeee5cb37 100644 --- a/js/ext/angular/src/directive/ionicSideMenu.js +++ b/js/ext/angular/src/directive/ionicSideMenu.js @@ -63,6 +63,8 @@ angular.module('ionic.ui.sideMenu', ['ionic.service.gesture']) compile: function(element, attr, transclude) { return function($scope, $element, $attr, sideMenuCtrl) { + $element.addClass('menu-content'); + Gesture.on('drag', function(e) { sideMenuCtrl._handleDrag(e); }, $element[0]); diff --git a/scss/ionic/_menu.scss b/scss/ionic/_menu.scss index 47f87a4875..a9f12330dd 100644 --- a/scss/ionic/_menu.scss +++ b/scss/ionic/_menu.scss @@ -19,6 +19,10 @@ -webkit-overflow-scrolling: touch; } +.menu-content { + box-shadow: $menu-side-shadow; +} + .menu-left { left: 0; } .menu-right { right: 0; } diff --git a/scss/ionic/_scaffolding.scss b/scss/ionic/_scaffolding.scss index b28aa34069..144c96d80c 100644 --- a/scss/ionic/_scaffolding.scss +++ b/scss/ionic/_scaffolding.scss @@ -93,6 +93,7 @@ body, .ionic-body { bottom: 84px; } +// A full screen section with a solid background .pane { position: fixed; top: 0; diff --git a/scss/ionic/_variables.scss b/scss/ionic/_variables.scss index 67df07d6ff..4fd31e8eaf 100644 --- a/scss/ionic/_variables.scss +++ b/scss/ionic/_variables.scss @@ -436,6 +436,8 @@ $menu-inset-border-color: #bbb; $menu-width: 270px; $menu-animation-speed: 200ms; +$menu-side-shadow: -1px 0px 3px rgba(0, 0, 0, 0.2), 1px 0px 3px rgba(0,0,0,0.2); + $split-pane-menu-width: 320px; $split-pane-menu-border-color: #eee;