From caf76a7f1f0c6a0a02bf9ba0be8b4578b8a12134 Mon Sep 17 00:00:00 2001 From: jlukic Date: Wed, 14 Jan 2015 16:04:44 -0500 Subject: [PATCH] Adds fixes for sidebar inside context other than body --- src/definitions/elements/segment.less | 7 ------- src/definitions/modules/sidebar.js | 1 + src/definitions/modules/sidebar.less | 22 +++++++++++++++++++--- src/definitions/modules/transition.js | 9 +++++++++ 4 files changed, 29 insertions(+), 10 deletions(-) diff --git a/src/definitions/elements/segment.less b/src/definitions/elements/segment.less index 2db93d2be..eb805d88c 100755 --- a/src/definitions/elements/segment.less +++ b/src/definitions/elements/segment.less @@ -335,13 +335,6 @@ border-radius: 0px; } -.ui.basic.segment:first-child { - padding-top: 0em; -} -.ui.basic.segment:last-child { - padding-bottom: 0em; -} - /*------------------- Fittted diff --git a/src/definitions/modules/sidebar.js b/src/definitions/modules/sidebar.js index 4f9457f63..aed55959e 100644 --- a/src/definitions/modules/sidebar.js +++ b/src/definitions/modules/sidebar.js @@ -311,6 +311,7 @@ $.fn.sidebar = function(parameters) { } if($module.nextAll(selector.pusher).length === 0 || $module.nextAll(selector.pusher)[0] !== $pusher[0]) { module.debug('Moved sidebar to correct parent element'); + debugger; module.error(error.movedSidebar, element); $module.detach().prependTo($context); module.refresh(); diff --git a/src/definitions/modules/sidebar.less b/src/definitions/modules/sidebar.less index eb0fc39da..4e90a99a6 100755 --- a/src/definitions/modules/sidebar.less +++ b/src/definitions/modules/sidebar.less @@ -85,15 +85,26 @@ /*-------------- - Body + Pushable ---------------*/ .pushable { height: 100%; overflow-x: hidden; + padding: 0em !important; +} + +/* Inside Page */ +.pushable:not(body) { + transform: translate3d(0, 0, 0); +} + +/* Whole Page */ +body.pushable { background: @canvasBackground !important; } + /*-------------- Fixed ---------------*/ @@ -115,12 +126,17 @@ position: relative; backface-visibility: hidden; min-height: 100%; - transition: transform @duration @easing; - background: @pageBackground; z-index: @middleLayer; } +body.pushable > .pusher { + background: @pageBackground; +} + +.pushable > .pusher { + background: inherit; +} /*-------------- Dimmer diff --git a/src/definitions/modules/transition.js b/src/definitions/modules/transition.js index 5ebf42cd7..0cefb7414 100644 --- a/src/definitions/modules/transition.js +++ b/src/definitions/modules/transition.js @@ -240,6 +240,15 @@ $.fn.transition = function() { if(settings.useFailSafe) { module.add.failSafe(); } + // showing multiple + $('.inline.sidebar') + .sidebar{ + context: $('.application.segment') + }) + ; + $('.inline.sidebar') + .sidebar('attach events', '.demo.menu .item') + ; module.set.duration(settings.duration); settings.onStart.call(this); module.debug('Starting tween', animation, $module.attr('class'));