Skip to content

Commit

Permalink
Migrate and cleanup legacy scss (#69369)
Browse files Browse the repository at this point in the history
  • Loading branch information
kertal authored Jul 20, 2020
1 parent b39c46e commit ec4f9d5
Show file tree
Hide file tree
Showing 37 changed files with 251 additions and 1,031 deletions.
3 changes: 1 addition & 2 deletions src/core/public/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
@import './chrome/index';
@import './overlays/index';
@import './rendering/index';
@import './styles/index';

// Global styles need to be migrated
@import '../../legacy/ui/public/styles/_legacy/_index';
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
@import '@elastic/eui/src/components/call_out/variables';
@import '@elastic/eui/src/components/call_out/mixins';

// SASSTODO: Replace with an EUI editor
// Intentionally not using the EuiCodeBlock colors here because they actually change
// hue from light to dark theme. So some colors would change while others wouldn't.
Expand Down Expand Up @@ -181,7 +178,7 @@
}

&.ace_multiselect .ace_selection.ace_start {
box-shadow: 0 0 3px 0px $euiColorEmptyShade;
box-shadow: 0 0 3px 0 $euiColorEmptyShade;
}

.ace_marker-layer .ace_step {
Expand Down
58 changes: 58 additions & 0 deletions src/core/public/styles/_base.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
@import '@elastic/eui/src/components/collapsible_nav/variables';
// Application Layout

// chrome-context
// TODO #64541
// Delete this block
.chrHeaderWrapper:not(.headerWrapper) .content {
display: flex;
flex-flow: row nowrap;
width: 100%;
height: 100%;
overflow: hidden;
}

.application,
.app-container {
> * {
position: relative;
}
}

.application {
position: relative;
z-index: 0;
display: flex;
flex-grow: 1;
flex-shrink: 0;
flex-basis: auto;
flex-direction: column;

> * {
flex-shrink: 0;
}
}

// We apply brute force focus states to anything not coming from Eui
// which has focus states designed at the component level.
// You can also use "kbn-resetFocusState" to not apply the default focus
// state. This is useful when you've already hand crafted your own
// focus states in Kibana.
:focus {
&:not([class^='eui']):not(.kbn-resetFocusState) {
@include euiFocusRing;
}
}

// A necessary hack so that the above focus policy doesn't pollute some EUI
// entrenched inputs.
.euiComboBox {
// :not() specificity needed to override the above
input:not([class^='eui']):focus {
animation: none !important;
}
}

.euiBody--collapsibleNavIsDocked .euiBottomBar {
margin-left: $euiCollapsibleNavWidth;
}
2 changes: 2 additions & 0 deletions src/core/public/styles/_index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@import './base';
@import './ace_overrides';
3 changes: 0 additions & 3 deletions src/legacy/ui/public/_index.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Legacy styles to come before all
@import './styles/_legacy/index';

// Prefix all styles with "kbn" to avoid conflicts.
// Examples
// kbnChart
Expand Down
153 changes: 0 additions & 153 deletions src/legacy/ui/public/styles/_legacy/_base.scss

This file was deleted.

7 changes: 0 additions & 7 deletions src/legacy/ui/public/styles/_legacy/_index.scss

This file was deleted.

11 changes: 0 additions & 11 deletions src/legacy/ui/public/styles/_legacy/components/_config.scss

This file was deleted.

67 changes: 0 additions & 67 deletions src/legacy/ui/public/styles/_legacy/components/_control_group.scss

This file was deleted.

59 changes: 0 additions & 59 deletions src/legacy/ui/public/styles/_legacy/components/_hintbox.scss

This file was deleted.

Loading

0 comments on commit ec4f9d5

Please sign in to comment.