Skip to content

Commit

Permalink
Further cleanup of SCSS
Browse files Browse the repository at this point in the history
  • Loading branch information
kertal committed Sep 16, 2020
1 parent b6a46bd commit e79be95
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 72 deletions.
39 changes: 37 additions & 2 deletions src/plugins/discover/public/application/_discover.scss
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,49 @@ discover-app {
top: $euiSizeXS;
}

.dscFixedScroll {
.dscTableFixedScroll {
overflow-x: auto;
padding-bottom: 0;

+ .dscFixedScroll__scroller {
+ .dscTableFixedScroll__scroller {
position: fixed;
bottom: 0;
overflow-x: auto;
overflow-y: hidden;
}
}

.dscCollapsibleSidebar {
position: relative;
z-index: $euiZLevel1;

.dscCollapsibleSidebar__collapseButton {
position: absolute;
top: 0;
right: -20px;
cursor: pointer;
z-index: -1;
min-height: $euiSizeM;
min-width: $euiSizeM;
padding: $euiSizeXS * .5;
}

&.closed {
width: 0 !important;
border-right-width: 0;
border-left-width: 0;
}
}

@include euiBreakpoint('xs', 's', 'm') {
.dscCollapsibleSidebar {
&.closed {
display: none;
}

.dscCollapsibleSidebar__collapseButton {
display: none;
}
}
}

Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
@import 'no_results';
@import 'histogram';
@import './collapsible_sidebar/index';

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function createFixedScroll($scope, $timeout) {
return function (el) {
const $el = typeof el.css === 'function' ? el : $(el);
let $window = $(window);
let $scroller = $('<div class="dscFixedScroll__scroller">').height(SCROLLER_HEIGHT);
let $scroller = $('<div class="dscTableFixedScroll__scroller">').height(SCROLLER_HEIGHT);

/**
* Remove the listeners bound in listen()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ describe('FixedScroll directive', function () {
return {
$container: $el,
$content: $content,
$scroller: $parent.find('.dscFixedScroll__scroller'),
$scroller: $parent.find('.dscTableFixedScroll__scroller'),
};
};
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export function DiscoverLegacy({
<main className="container-fluid">
<div className="row">
<div
className={`col-md-2 dscSidebar__container collapsible-sidebar ${sidebarClassName}`}
className={`col-md-2 dscSidebar__container dscCollapsibleSidebar ${sidebarClassName}`}
id="discover-sidebar"
data-test-subj="discover-sidebar"
>
Expand Down Expand Up @@ -203,7 +203,7 @@ export function DiscoverLegacy({
aria-controls="discover-sidebar"
aria-expanded={isSidebarClosed ? 'false' : 'true'}
aria-label="Toggle sidebar"
className="kbnCollapsibleSidebar__collapseButton"
className="dscCollapsibleSidebar__collapseButton"
/>
</div>
<div className={`dscWrapper ${mainSectionClassName}`}>
Expand Down Expand Up @@ -260,7 +260,7 @@ export function DiscoverLegacy({

<div className="dscResults">
<section
className="dscTable dscFixedScroll"
className="dscTable dscTableFixedScroll"
aria-labelledby="documentsAriaLabel"
ref={fixedScrollRef}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ filter-bar,
/* hide unusable controls */
discover-app .dscTimechart,
discover-app .dscSidebar__container,
discover-app .kbnCollapsibleSidebar__collapseButton,
discover-app .dscCollapsibleSidebar__collapseButton,
discover-app .discover-table-footer {
display: none;
}
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/reporting/server/lib/layouts/print.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ filter-bar,
/* hide unusable controls */
discover-app .dscTimechart,
discover-app .dscSidebar__container,
discover-app .kbnCollapsibleSidebar__collapseButton,
discover-app .dscCollapsibleSidebar__collapseButton,
discover-app .discover-table-footer {
display: none;
}
Expand Down

0 comments on commit e79be95

Please sign in to comment.