Browse Source

#1771 Fixes sidebar in IE with context. Makes all sidebar use position: absolute, instead of transform fix when not initialized in body

pull/1785/head
jlukic 9 years ago
parent
commit
4e71ee417c
2 changed files with 14 additions and 9 deletions
  1. 8
      src/definitions/modules/sidebar.js
  2. 15
      src/definitions/modules/sidebar.less

8
src/definitions/modules/sidebar.js

@ -253,7 +253,7 @@ $.fn.sidebar = function(parameters) {
if(direction === 'left' || direction === 'right') { if(direction === 'left' || direction === 'right') {
module.debug('Adding CSS rules for animation distance', width); module.debug('Adding CSS rules for animation distance', width);
style += '' style += ''
+ ' .ui.visible.' + direction + '.sidebar ~ .pusher:after {'
+ ' body.pushable > .ui.visible.' + direction + '.sidebar ~ .pusher:after {'
+ ' -webkit-transform: translate3d('+ distance[direction] + 'px, 0, 0);' + ' -webkit-transform: translate3d('+ distance[direction] + 'px, 0, 0);'
+ ' transform: translate3d('+ distance[direction] + 'px, 0, 0);' + ' transform: translate3d('+ distance[direction] + 'px, 0, 0);'
+ ' }' + ' }'
@ -261,7 +261,7 @@ $.fn.sidebar = function(parameters) {
} }
else if(direction === 'top' || direction == 'bottom') { else if(direction === 'top' || direction == 'bottom') {
style += '' style += ''
+ ' .ui.visible.' + direction + '.sidebar ~ .pusher:after {'
+ ' body.pushable > .ui.visible.' + direction + '.sidebar ~ .pusher:after {'
+ ' -webkit-transform: translate3d(0, ' + distance[direction] + 'px, 0);' + ' -webkit-transform: translate3d(0, ' + distance[direction] + 'px, 0);'
+ ' transform: translate3d(0, ' + distance[direction] + 'px, 0);' + ' transform: translate3d(0, ' + distance[direction] + 'px, 0);'
+ ' }' + ' }'
@ -269,8 +269,8 @@ $.fn.sidebar = function(parameters) {
} }
/* opposite sides visible forces content overlay */ /* opposite sides visible forces content overlay */
style += '' style += ''
+ ' .ui.visible.left.sidebar ~ .ui.visible.right.sidebar ~ .pusher:after,'
+ ' .ui.visible.right.sidebar ~ .ui.visible.left.sidebar ~ .pusher:after {'
+ ' body.pushable > .ui.visible.left.sidebar ~ .ui.visible.right.sidebar ~ .pusher:after,'
+ ' body.pushable > .ui.visible.right.sidebar ~ .ui.visible.left.sidebar ~ .pusher:after {'
+ ' -webkit-transform: translate3d(0px, 0, 0);' + ' -webkit-transform: translate3d(0px, 0, 0);'
+ ' transform: translate3d(0px, 0, 0);' + ' transform: translate3d(0px, 0, 0);'
+ ' }' + ' }'

15
src/definitions/modules/sidebar.less

@ -94,16 +94,21 @@
padding: 0em !important; padding: 0em !important;
} }
/* Inside Page */
.pushable:not(body) {
transform: translate3d(0, 0, 0);
}
/* Whole Page */ /* Whole Page */
body.pushable { body.pushable {
background: @canvasBackground !important; background: @canvasBackground !important;
} }
/* Page Context */
.pushable:not(body) {
transform: translate3d(0, 0, 0);
}
.pushable:not(body) .ui.sidebar,
.pushable:not(body) > .fixed,
.pushable:not(body) > .pusher:after {
position: absolute;
}
/*-------------- /*--------------
Fixed Fixed

Loading…
Cancel
Save