Migrate and cleanup legacy scss (#69369)

This commit is contained in:
Matthias Wilhelm 2020-07-20 10:43:12 +02:00 committed by GitHub
parent b39c46eeac
commit ec4f9d50ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
37 changed files with 251 additions and 1031 deletions

View file

@ -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';

View file

@ -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.
@ -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 {

View file

@ -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;
}

View file

@ -0,0 +1,2 @@
@import './base';
@import './ace_overrides';

View file

@ -1,6 +1,3 @@
// Legacy styles to come before all
@import './styles/_legacy/index';
// Prefix all styles with "kbn" to avoid conflicts.
// Examples
// kbnChart

View file

@ -1,153 +0,0 @@
@import '@elastic/eui/src/components/collapsible_nav/variables';
// Forms
// Angular form states
input.ng-invalid,
textarea.ng-invalid,
select.ng-invalid {
&.ng-dirty,
&.ng-touched {
border-color: $euiColorDanger !important;
}
}
input[type='radio'],
input[type='checkbox'],
.radio,
.radio-inline,
.checkbox,
.checkbox-inline {
&[disabled],
fieldset[disabled] & {
cursor: default;
opacity: 0.8;
}
}
.checkbox label {
display: flex;
align-items: center;
padding-left: 0 !important;
input[type='checkbox'] {
float: none;
margin: 0 $euiSizeXS;
position: static;
}
}
// 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;
}
> config {
z-index: 1;
}
> navbar {
padding-bottom: $euiSizeS;
}
> nav,
> navbar {
z-index: 2 !important;
}
}
.application {
position: relative;
z-index: 0;
display: flex;
flex-grow: 1;
flex-shrink: 0;
flex-basis: auto;
flex-direction: column;
> * {
flex-shrink: 0;
}
}
[fixed-scroll] {
overflow-x: auto;
padding-bottom: 0;
+ .fixed-scroll-scroller {
position: fixed;
bottom: 0;
overflow-x: auto;
overflow-y: hidden;
}
}
// Too overused in many places to be moved elsewhere
.page-row {
padding: 0 $euiSize;
margin: $euiSize 0;
}
.page-row-text {
color: $euiColorDarkShade;
font-size: $euiFontSizeS;
}
// 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;
}
// Utility classes
.fullWidth {
width: 100% !important;
}
.small {
font-size: 0.9em !important;
}
.smaller {
font-size: 0.8em !important;
}
.smallest {
font-size: 0.7em !important;
}
.text-monospace {
font-family: $euiCodeFontFamily;
}

View file

@ -1,7 +0,0 @@
// //
// // KIBANA THEME
@import './base';
@import './mixins';
// // Components
@import './components/index';

View file

@ -1,11 +0,0 @@
// SASSTODO: Selector is so generic it's hard to find if it's actually used
.config {
@extend .navbar !optional;
@extend .navbar-default !optional;
border-bottom: 1px solid transparent;
.container-fluid {
background-color: $euiPageBackgroundColor;
padding: $euiSizeS;
}
}

View file

@ -1,67 +0,0 @@
.control-group {
display: flex;
flex: 0 0 auto;
flex-direction: row;
flex-wrap: wrap;
align-items: stretch;
padding: $euiSizeXS $euiSize;
> * {
padding-right: $euiSize;
flex: 0 0 auto;
&:last-child {
padding-right: 0;
}
}
// horizontal group of buttons/form elements
.inline-form .input-group {
margin-bottom: 0;
display: flex;
> * {
border-radius: 0;
}
> :first-child {
border-bottom-left-radius: $euiBorderRadius;
border-top-left-radius: $euiBorderRadius;
}
> :last-child {
border-bottom-right-radius: $euiBorderRadius;
border-top-right-radius: $euiBorderRadius;
}
}
.inline-form {
@include flex-parent(0, 0, auto);
display: flex;
> .typeahead {
@include flex-parent();
> .input-group {
display: flex;
flex: 1 0 auto;
> * {
float: none;
height: auto;
width: auto;
flex: 0 0 auto;
}
input[type="text"] {
flex: 1 1 100%;
}
}
}
}
// the element should take up an even share of available space
> .fill {
flex: 1 1 1%;
}
}

View file

@ -1,59 +0,0 @@
.hintbox {
padding: $euiSizeS $euiSizeM;
border-radius: $euiBorderRadius;
margin-bottom: $euiSizeS;
background-color: $euiColorLightShade;
line-height: $euiLineHeight;
a {
color: $euiLinkColor !important;
&:hover {
color: darken($euiLinkColor, 10%) !important;
}
}
pre {
background-color: $euiColorEmptyShade;
}
ul, ol {
padding-left: $euiSizeL;
}
// inspired by Bootstrap alerts component
// https://github.com/twbs/bootstrap/blob/063c1b0780ea0240e4adce4c88d57fc23e099475/less/alerts.less#L27-L35
> * {
margin: 0;
}
> * + * {
margin-top: $euiSizeS;
}
// https://github.com/twbs/bootstrap/blob/2aa102bfd40859d15790febed1939e0111a6fb1a/less/tables.less#L88-L106
.table-bordered {
border: $euiBorderThin;
> thead,
> tbody,
> tfoot {
> tr {
> th,
> td {
border: $euiBorderThin;
}
}
}
> thead > tr {
> th,
> td {
border-bottom-width: 2px;
}
}
}
}
.hintbox-label,
.hintbox-label[ng-click] {
cursor: help;
}

View file

@ -1,13 +0,0 @@
@import './ace_overrides';
@import './control_group';
@import './hintbox';
@import './input';
@import './kui_forms';
@import './list_group_menu';
@import './navbar';
@import './config';
@import './pagination';
@import './spinner';
@import './table';
@import './truncate';
@import './ui_select';

View file

@ -1,12 +0,0 @@
i.input-error {
position: absolute;
margin-left: -$euiSizeL;
color: $euiColorDanger;
margin-top: $euiSizeS;
z-index: 5;
}
select {
color: $euiTextColor;
background-color: $euiColorEmptyShade;
}

View file

@ -1,29 +0,0 @@
.form-control {
@include __legacyInputStyles__bad;
}
select.form-control {
@include __legacySelectStyles__bad;
}
.kuiFormSection {
margin-bottom: $euiSize;
}
.kuiFormLabel {
@include __legacyLabelStyles__bad;
display: block;
margin-bottom: 5px;
}
.kuiInputNote {
margin: $euiSizeXS 0 $euiSizeS;
}
.kuiInputNote--danger {
color: $euiColorDanger;
}
.kuiInputNote--warning {
color: $euiColorWarning;
}

View file

@ -1,86 +0,0 @@
navbar {
@extend .control-group;
max-height: 340px;
margin-bottom: 0;
padding: 0 $euiSizeS $euiSizeXS;
color: $euiColorDarkShade;
background-color: $euiColorLightShade;
border: none;
z-index: $euiZLevel1;
> * {
padding-right: $euiSizeS;
}
.navbar-text {
margin-top: $euiSizeXS;
margin-bottom: $euiSizeXS;
}
// the "brand" that is displayed, usually on the left of the navbar
> .name {
@include euiTextTruncate;
align-self: center;
font-size: $euiFontSizeL;
}
button {
color: $euiColorDarkShade;
background-color: transparent;
&:hover,
&:focus {
color: $euiColorDarkShade;
background-color: transparent;
}
&:active, &.active {
color: $euiColorDarkestShade;
background-color: transparent;
box-shadow: none;
&:focus {
outline: none;
}
}
&[disabled] {
color: $euiColorMediumShade;
background-color: transparent;
}
}
.inline-form .input-group {
button {
color: $euiColorEmptyShade;
background-color: $euiColorDarkShade;
border: none;
}
}
// responsive modifications
// desktop
@include euiBreakpoint('l', 'xl') {
> .name {
// 500px is sort of arbitrary, not sure how to deal with lots of buttons
max-width: 500px;
}
}
// tablets/phones
@include euiBreakpoint('xs', 's', 'm') {
> .fill {
flex: 1 1 map-get($euiBreakpoints, 'l');
}
}
// phones
@include euiBreakpoint('xs', 's') {
> .name {
max-width: 100%;
}
}
}

View file

@ -1,56 +0,0 @@
paginate {
display: block;
paginate-controls {
display: flex;
align-items: center;
padding: $euiSizeXS $euiSizeXS $euiSizeS;
text-align: center;
.pagination-other-pages {
flex: 1 0 auto;
display: flex;
justify-content: center;
}
.pagination-other-pages-list {
flex: 0 0 auto;
display: flex;
justify-content: center;
padding: 0;
margin: 0;
list-style: none;
> li {
flex: 0 0 auto;
user-select: none;
a {
text-decoration: none;
background-color: $euiColorLightestShade;
margin-left: $euiSizeXS / 2;
padding: $euiSizeS $euiSizeM;
}
a:hover {
text-decoration: underline;
}
&.active a {
text-decoration: none !important;
font-weight: $euiFontWeightBold;
color: $euiColorDarkShade;
cursor: default;
}
}
}
.pagination-size {
flex: 0 0 auto;
input[type=number] {
width: 3em;
}
}
}
}

View file

@ -1,6 +0,0 @@
.spinner.ng-hide {
visibility: hidden;
display: block !important;
opacity: 0;
transition-delay: 0.25s;
}

View file

@ -1,46 +0,0 @@
@import '../../../../../../plugins/discover/public/application/mixins';
.table {
// Nesting
.table {
background-color: $euiColorEmptyShade;
}
}
kbn-table, .kbn-table, tbody[kbn-rows] {
@include dscDocSourceStyle;
// sub tables should not have a leading border
.table .table {
margin-bottom: 0;
tr:first-child > td {
border-top: none;
}
td.field-name {
font-weight: $euiFontWeightBold;
}
}
}
table {
th {
i.fa-sort {
color: $euiColorLightShade;
}
button.fa-sort-asc,
button.fa-sort-down,
i.fa-sort-asc,
i.fa-sort-down {
color: $euiColorPrimary;
}
button.fa-sort-desc,
button.fa-sort-up,
i.fa-sort-desc,
i.fa-sort-up {
color: $euiColorPrimary;
}
}
}

View file

@ -1,3 +0,0 @@
.truncate-by-height {
overflow: hidden;
}

View file

@ -1,357 +0,0 @@
/*!
* ui-select
* http://github.com/angular-ui/ui-select
* Version: 0.19.5 - 2016-10-24T23:13:59.551Z
* License: MIT
*/
/* Style when highlighting a search. */
.ui-select-highlight {
font-weight: bold;
}
.ui-select-offscreen {
clip: rect(0 0 0 0) !important;
width: 1px !important;
height: 1px !important;
border: 0 !important;
margin: 0 !important;
padding: 0 !important;
overflow: hidden !important;
position: absolute !important;
outline: 0 !important;
left: 0px !important;
top: 0px !important;
}
.ui-select-choices-row:hover {
background-color: $euiColorLightestShade;
}
/* Select2 theme */
/* Mark invalid Select2 */
.ng-dirty.ng-invalid > a.select2-choice {
border-color: $euiColorDanger;
}
.select2-result-single {
padding-left: 0;
}
.select2-locked > .select2-search-choice-close {
display: none;
}
.select-locked > .ui-select-match-close {
display: none;
}
body > .select2-container.open {
z-index: 9999; /* The z-index Select2 applies to the select2-drop */
}
/* Handle up direction Select2 */
.ui-select-container[theme='select2'].direction-up .ui-select-match,
.ui-select-container.select2.direction-up .ui-select-match {
border-radius: 4px; /* FIXME hardcoded value :-/ */
border-top-left-radius: 0;
border-top-right-radius: 0;
}
.ui-select-container[theme='select2'].direction-up .ui-select-dropdown,
.ui-select-container.select2.direction-up .ui-select-dropdown {
border-radius: 4px; /* FIXME hardcoded value :-/ */
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
border-top-width: 1px; /* FIXME hardcoded value :-/ */
border-top-style: solid;
box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.25);
margin-top: -4px; /* FIXME hardcoded value :-/ */
}
.ui-select-container[theme='select2'].direction-up .ui-select-dropdown .select2-search,
.ui-select-container.select2.direction-up .ui-select-dropdown .select2-search {
margin-top: 4px; /* FIXME hardcoded value :-/ */
}
.ui-select-container[theme='select2'].direction-up.select2-dropdown-open .ui-select-match,
.ui-select-container.select2.direction-up.select2-dropdown-open .ui-select-match {
border-bottom-color: $euiColorPrimary;
}
.ui-select-container[theme='select2'] .ui-select-dropdown .ui-select-search-hidden,
.ui-select-container[theme='select2'] .ui-select-dropdown .ui-select-search-hidden input {
opacity: 0;
height: 0;
min-height: 0;
padding: 0;
margin: 0;
border: 0;
}
/* Bootstrap theme */
/* Helper class to show styles when focus */
.btn-default-focus {
color: $euiTextColor;
background-color: $euiColorEmptyShade;
border-color: $euiColorPrimary;
text-decoration: none;
outline: none;
box-shadow: none;
}
.ui-select-bootstrap .ui-select-toggle {
@include __legacyInputStyles__bad;
@include __legacySelectStyles__bad;
}
.ui-select-bootstrap .ui-select-toggle > .caret {
display: none;
}
/* Fix Bootstrap dropdown position when inside a input-group */
.input-group > .ui-select-bootstrap.dropdown {
/* Instead of relative */
position: static;
}
.input-group > .ui-select-bootstrap > input.ui-select-search.form-control {
border-radius: 4px; /* FIXME hardcoded value :-/ */
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.input-group > .ui-select-bootstrap > input.ui-select-search.form-control.direction-up {
border-radius: 4px !important; /* FIXME hardcoded value :-/ */
border-top-right-radius: 0 !important;
border-bottom-right-radius: 0 !important;
}
.ui-select-bootstrap .ui-select-search-hidden {
opacity: 0;
height: 0;
min-height: 0;
padding: 0;
margin: 0;
border: 0;
}
.ui-select-bootstrap > .ui-select-match > .btn {
@include __legacyInputStyles__bad;
@include __legacySelectStyles__bad;
text-align: left !important; // Instead of center because of .btn
.ui-select-placeholder {
color: $euiColorMediumShade;
}
&:focus,
&:active {
background-color: $euiColorEmptyShade;
color: $euiTextColor;
outline: none;
}
}
.ui-select-bootstrap > .ui-select-match > .caret {
display: none;
}
/* See Scrollable Menu with Bootstrap 3 http://stackoverflow.com/questions/19227496 */
.ui-select-bootstrap > .ui-select-choices,
.ui-select-bootstrap > .ui-select-no-choice {
width: 100%;
height: auto;
max-height: $euiSize * 14;
overflow-x: hidden;
}
body > .ui-select-bootstrap.open {
z-index: $euiZContentMenu;
}
.ui-select-multiple.ui-select-bootstrap {
height: auto;
padding: 3px 5px 2px;
border: $euiBorderThin;
background-color: $euiFormBackgroundColor;
&.kuiInputError {
border-color: $euiColorDanger;
}
}
.ui-select-multiple.ui-select-bootstrap input.ui-select-search {
background-color: transparent !important; /* To prevent double background when disabled */
border: none;
outline: none;
height: 1.666666em;
margin-bottom: 3px;
}
.ui-select-multiple.ui-select-bootstrap .ui-select-match .close {
font-size: 1.6em;
line-height: 0.75;
}
.ui-select-multiple.ui-select-bootstrap .ui-select-match-item {
outline: 0;
margin: 0 3px 3px 0;
}
.ui-select-multiple .ui-select-match-item {
position: relative;
}
.ui-select-multiple .ui-select-match-item.dropping .ui-select-match-close {
pointer-events: none;
}
.ui-select-multiple:hover .ui-select-match-item.dropping-before:before {
content: '';
position: absolute;
top: 0;
right: 100%;
height: 100%;
margin-right: 2px;
border-left: 1px solid $euiColorPrimary;
}
.ui-select-multiple:hover .ui-select-match-item.dropping-after:after {
content: '';
position: absolute;
top: 0;
left: 100%;
height: 100%;
margin-left: 2px;
border-right: 1px solid $euiColorPrimary;
}
.ui-select-bootstrap .ui-select-choices-row > span {
@include euiFontSizeS;
@include euiTextTruncate;
font-weight: inherit;
cursor: pointer;
display: block;
padding: $euiSizeXS $euiSize;
clear: both;
color: $euiTextColor;
white-space: nowrap;
&:hover,
&:focus {
text-decoration: none;
color: $euiTextColor;
background-color: $euiFocusBackgroundColor;
}
}
.ui-select-bootstrap .ui-select-choices-row.active > span {
color: $euiTextColor;
text-decoration: none;
outline: 0;
background-color: $euiFocusBackgroundColor;
}
.ui-select-bootstrap .ui-select-choices-row.disabled > span,
.ui-select-bootstrap .ui-select-choices-row.active.disabled > span {
color: $euiButtonColorDisabled;
cursor: not-allowed;
background-color: transparent;
}
/* fix hide/show angular animation */
.ui-select-match.ng-hide-add,
.ui-select-search.ng-hide-add {
display: none !important;
}
/* Mark invalid Bootstrap */
.ui-select-bootstrap.ng-dirty.ng-invalid > button.btn.ui-select-match {
border-color: $euiColorDanger;
}
/* Handle up direction Bootstrap */
.ui-select-container[theme='bootstrap'].direction-up .ui-select-dropdown {
@include euiBottomShadowMedium;
}
.ui-select-bootstrap .ui-select-match-text {
width: 100%;
padding-right: 1em;
}
.ui-select-bootstrap .ui-select-match-text span {
display: inline-block;
width: 100%;
overflow: hidden;
}
.ui-select-bootstrap .ui-select-toggle > a.btn {
position: absolute;
height: 10px;
right: 10px;
margin-top: -2px;
}
/* Spinner */
.ui-select-refreshing {
position: absolute;
right: 0;
padding: 8px 27px;
top: 1px;
display: inline-block;
font-family: 'Glyphicons Halflings';
font-style: normal;
font-weight: normal;
line-height: 1;
-webkit-font-smoothing: antialiased;
}
@-webkit-keyframes ui-select-spin {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
@keyframes ui-select-spin {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
.ui-select-spin {
-webkit-animation: ui-select-spin 2s infinite linear;
animation: ui-select-spin 2s infinite linear;
}
.ui-select-refreshing.ng-animate {
-webkit-animation: none 0s;
}
// Other Custom
/**
* 1. Fix appearance of ui-select in the Filtering UI.
*/
.btn-default .ui-select-placeholder {
color: $euiColorMediumShade; /* 1 */
}
.uiSelectMatch--ellipsis {
@include euiTextTruncate;
}
.ui-select-choices-group-label {
@include euiTitle('xxxs');
@include euiTextTruncate;
padding: $euiSizeXS;
}

View file

@ -105,12 +105,10 @@
@keyframes kibanaFullScreenGraphics_FadeIn {
from {
opacity: 0;
transform: translateY(200px), scale(.75);
}
to {
opacity: 1;
transform: translateY(0), scale(1);
}
}
}

View file

@ -103,3 +103,15 @@ discover-app {
right: $euiSizeM;
top: $euiSizeXS;
}
[fixed-scroll] {
overflow-x: auto;
padding-bottom: 0;
+ .fixed-scroll-scroller {
position: fixed;
bottom: 0;
overflow-x: auto;
overflow-y: hidden;
}
}

View file

@ -1,4 +0,0 @@
// SASSTODO: the classname is dynamically generated with ng-class
.tab-discover {
overflow: hidden;
}

View file

@ -1,27 +0,0 @@
/**
* Style ES document _source in table view <dt>key:<dt><dd>value</dd>
* Use alpha so this will stand out against non-white backgrounds, e.g. the highlighted
* row in the Context Log.
*/
@mixin dscDocSourceStyle {
dl.source {
margin-bottom: 0;
line-height:2em;
word-break: break-word;
dt, dd {
display: inline;
}
dt {
background-color: transparentize(shade($euiColorPrimary, 20%), .9);
color: $euiTextColor;
padding: ($euiSizeXS / 2) $euiSizeXS;
margin-right: $euiSizeXS;
word-break: normal;
border-radius: $euiBorderRadius;
}
}
}

View file

@ -27,7 +27,6 @@ doc-table {
}
.kbnDocTable {
@include dscDocSourceStyle;
font-size: $euiFontSizeXS;
th {
@ -40,6 +39,35 @@ doc-table {
}
}
.kbn-table,
.kbnDocTable {
/**
* Style ES document _source in table view <dt>key:<dt><dd>value</dd>
* Use alpha so this will stand out against non-white backgrounds, e.g. the highlighted
* row in the Context Log.
*/
dl.source {
margin-bottom: 0;
line-height: 2em;
word-break: break-word;
dt,
dd {
display: inline;
}
dt {
background-color: transparentize(shade($euiColorPrimary, 20%), 0.9);
color: $euiTextColor;
padding: ($euiSizeXS / 2) $euiSizeXS;
margin-right: $euiSizeXS;
word-break: normal;
border-radius: $euiBorderRadius;
}
}
}
.kbnDocTable__row {
td {
position: relative;
@ -80,3 +108,50 @@ doc-table {
text-align: center;
}
.truncate-by-height {
overflow: hidden;
}
.table {
// Nesting
.table {
background-color: $euiColorEmptyShade;
}
}
.kbn-table {
// sub tables should not have a leading border
.table .table {
margin-bottom: 0;
tr:first-child > td {
border-top: none;
}
td.field-name {
font-weight: $euiFontWeightBold;
}
}
}
table {
th {
i.fa-sort {
color: $euiColorLightShade;
}
button.fa-sort-asc,
button.fa-sort-down,
i.fa-sort-asc,
i.fa-sort-down {
color: $euiColorPrimary;
}
button.fa-sort-desc,
button.fa-sort-up,
i.fa-sort-desc,
i.fa-sort-up {
color: $euiColorPrimary;
}
}
}

View file

@ -1,4 +1,2 @@
@import '../../mixins';
@import 'doc_table';
@import 'components/index';

View file

@ -1,13 +1,2 @@
// Discover plugin styles
@import 'mixins';
@import 'discover';
@import 'hacks';
// Prefix all styles with "dsc" to avoid conflicts.
// Examples
// dscTable
// dscTable__footer
// monChart__legend--small
// monChart__legend-isLoading
@import 'angular/index';
@import 'discover';

View file

@ -0,0 +1,57 @@
paginate {
display: block;
paginate-controls {
display: flex;
align-items: center;
padding: $euiSizeXS $euiSizeXS $euiSizeS;
text-align: center;
.pagination-other-pages {
flex: 1 0 auto;
display: flex;
justify-content: center;
}
.pagination-other-pages-list {
flex: 0 0 auto;
display: flex;
justify-content: center;
padding: 0;
margin: 0;
list-style: none;
> li {
flex: 0 0 auto;
user-select: none;
a {
text-decoration: none;
background-color: $euiColorLightestShade;
margin-left: $euiSizeXS / 2;
padding: $euiSizeS $euiSizeM;
}
a:hover {
text-decoration: underline;
}
&.active a {
text-decoration: none !important;
font-weight: $euiFontWeightBold;
color: $euiColorDarkShade;
cursor: default;
}
}
}
.pagination-size {
flex: 0 0 auto;
input[type=number] {
width: 3em;
}
}
}
}

View file

@ -19,6 +19,7 @@
import _ from 'lodash';
import { i18n } from '@kbn/i18n';
import './_paginate.scss';
import paginateControlsTemplate from './paginate_controls.html';
export function PaginateDirectiveProvider($parse, $compile) {

View file

@ -0,0 +1,19 @@
// Angular form states
.ng-invalid {
&.ng-dirty,
&.ng-touched {
border-color: $euiColorDanger;
}
}
input[type='radio'],
input[type='checkbox'],
.radio,
.checkbox {
&[disabled],
fieldset[disabled] & {
cursor: default;
opacity: .8;
}
}

View file

@ -1,23 +1,19 @@
// These mixins are temporary helpers to consolidate styles of elements that
// are not yet converted to use EUI.
// DO NOT CONTINUE TO USE THESE MIXINS
@mixin __legacyInputStyles__bad {
&:not([type='range']) {
appearance: none;
}
.form-control {
@include euiFontSizeS;
display: block;
width: 100%;
height: $euiFormControlCompressedHeight;
padding: $euiSizeXS $euiSizeM;
@include euiFontSizeS;
border: $euiBorderThin;
background-color: $euiFormBackgroundColor;
color: $euiTextColor;
border-radius: $euiBorderRadius;
cursor: pointer;
&:not([type='range']) {
appearance: none;
}
&:focus {
border-color: $euiColorPrimary;
outline: none;
@ -25,30 +21,16 @@
}
}
@mixin __legacySelectStyles__bad {
// sass-lint:disable-block no-qualifying-elements
select.form-control {
// Makes the select arrow similar to EUI's arrowDown icon
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='#{hexToRGB($euiTextColor)}' d='M13.0688508,5.15725038 L8.38423975,9.76827428 C8.17054415,9.97861308 7.82999214,9.97914095 7.61576025,9.76827428 L2.93114915,5.15725038 C2.7181359,4.94758321 2.37277319,4.94758321 2.15975994,5.15725038 C1.94674669,5.36691756 1.94674669,5.70685522 2.15975994,5.9165224 L6.84437104,10.5275463 C7.48517424,11.1582836 8.51644979,11.1566851 9.15562896,10.5275463 L13.8402401,5.9165224 C14.0532533,5.70685522 14.0532533,5.36691756 13.8402401,5.15725038 C13.6272268,4.94758321 13.2818641,4.94758321 13.0688508,5.15725038 Z'/%3E%3C/svg%3E");
background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"%3E%3Cpath fill="#{hexToRGB($euiTextColor)}" d="M13.0688508,5.15725038 L8.38423975,9.76827428 C8.17054415,9.97861308 7.82999214,9.97914095 7.61576025,9.76827428 L2.93114915,5.15725038 C2.7181359,4.94758321 2.37277319,4.94758321 2.15975994,5.15725038 C1.94674669,5.36691756 1.94674669,5.70685522 2.15975994,5.9165224 L6.84437104,10.5275463 C7.48517424,11.1582836 8.51644979,11.1566851 9.15562896,10.5275463 L13.8402401,5.9165224 C14.0532533,5.70685522 14.0532533,5.36691756 13.8402401,5.15725038 C13.6272268,4.94758321 13.2818641,4.94758321 13.0688508,5.15725038 Z"/%3E%3C/svg%3E');
background-size: $euiSize;
background-repeat: no-repeat;
background-position: calc(100% - #{$euiSizeS});
padding-right: $euiSizeXL;
&::-ms-expand {
display: none;
}
&:focus::-ms-value {
color: $euiTextColor;
background: transparent;
}
}
@mixin __legacyLabelStyles__bad {
font-size: $euiFontSizeXS;
font-weight: $euiFontWeightSemiBold;
color: $euiTextColor;
&[for] {
cursor: pointer;
}
.fullWidth {
width: 100%;
}

View file

@ -3,3 +3,6 @@
@import './timelion_expression_suggestions/index';
@import './timelion_help/index';
@import './timelion_interval/index';
@import './saved_object_finder';
@import './form';

View file

@ -1,7 +1,7 @@
.list-group-menu {
&.select-mode a {
outline: none;
color: tintOrShade($euiColorPrimary, 10%, 10%);
outline: none;
color: tintOrShade($euiColorPrimary, 10%, 10%);
}
.list-group-menu-item {
@ -12,9 +12,11 @@
font-weight: bold;
background-color: $euiColorLightShade;
}
&:hover {
background-color: tintOrShade($euiColorPrimary, 90%, 90%);
}
li {
list-style: none;
color: tintOrShade($euiColorPrimary, 10%, 10%);

View file

@ -8,4 +8,5 @@
// timChart__legend-isLoading
@import './app';
@import './base';
@import './directives/index';

View file

@ -36,3 +36,7 @@ kbn-agg-table-group {
padding: 0;
}
}
.small {
font-size: 0.9em !important;
}

View file

@ -18,42 +18,6 @@
cursor: not-allowed;
}
// ML bootstrap-select hacks that sit on top of Kibana hacks that often fight with KUI
// Should go away when EUI is fully adopted
.ui-select-match {
.btn-default[disabled],
.btn-default[disabled]:hover,
.btn-default[disabled]:focus {
background-color: $euiColorLightShade;
border-color: $euiColorLightShade;
opacity: 1;
.ui-select-placeholder {
color: $euiColorDarkShade;
}
}
.btn {
border: 1px solid $euiColorLightShade;
background-color: $euiColorEmptyShade;
color: $euiColorDarkestShade;
}
}
.ui-select-container input[type="search"]::placeholder {
color: $euiColorDarkShade;
}
.ui-select-container input[type="search"]:focus {
box-shadow: none;
}
.ui-select-multiple.ui-select-bootstrap input.ui-select-search {
font-size: $euiFontSizeS;
padding: 5px 10px; // Matches current padding hacks from other parts of Kibana
}
// SASSTODO: Remove all the floats
.clear, .clearfix {
clear: both;

View file

@ -37,7 +37,6 @@ filter-bar,
discover-app .dscTimechart,
discover-app .dscSidebar__container,
discover-app .kbnCollapsibleSidebar__collapseButton,
discover-app navbar[name=discover-search],
discover-app .discover-table-footer {
display: none;
}

View file

@ -36,7 +36,6 @@ filter-bar,
discover-app .dscTimechart,
discover-app .dscSidebar__container,
discover-app .kbnCollapsibleSidebar__collapseButton,
discover-app navbar[name="discover-search"],
discover-app .discover-table-footer {
display: none;
}