Skip to content

Commit

Permalink
feat(sideMenu): Degrade .menu-content box-shadow w/ platform grade fo…
Browse files Browse the repository at this point in the history
…r animation performance
  • Loading branch information
Adam Bradley committed Feb 21, 2014
1 parent b69b40c commit d2a0780
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
15 changes: 14 additions & 1 deletion js/ext/angular/test/sideMenu2.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" href="../../../../dist/css/ionic.css">
<script src="../../../../dist/js/ionic.bundle.js"></script>
</head>
<body>
<body class="grade-a">

<div ng-controller="MainCtrl">
<ion-nav-view></ion-nav-view>
Expand Down Expand Up @@ -54,6 +54,11 @@
<div class="button" ng-click="sideMenuController.toggleLeft()" style="position: absolute; left: 100px; top: 200px;">
Left Menu
</div>
<select ng-model="data.grade" ng-change="gradeChange(data.grade)">
<option>grade-a</option>
<option>grade-b</option>
<option>grade-c</option>
</select>
<p ng-repeat="p in range">{{$index}}....</p>
<p>(On desktop click and drag from left to right)</p>
</ion-content>
Expand Down Expand Up @@ -165,6 +170,14 @@
.controller('MainCtrl', function($scope) {
console.log('MainCtrl');

$scope.data = {
grade: 'grade-a'
};

$scope.gradeChange = function(grade) {
document.body.className = grade;
};

$scope.range = [];
for (var i=0; i<150; i++) $scope.range.push(i);

Expand Down
9 changes: 9 additions & 0 deletions scss/_menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@
box-shadow: $menu-side-shadow;
}

.grade-b .menu-content,
.grade-c .menu-content {
right: -1px;
left: -1px;
border-right: 1px solid #ccc;
border-left: 1px solid #ccc;
box-shadow: none;
}

.menu-left {
left: 0;
}
Expand Down

0 comments on commit d2a0780

Please sign in to comment.