grafana/public/sass/components/_slate_editor.scss

163 lines
3.1 KiB
SCSS
Raw Normal View History

2018-06-11 10:36:45 -05:00
.slate-query-field {
font-size: $font-size-base;
2018-06-11 10:36:45 -05:00
font-family: $font-family-monospace;
height: auto;
word-break: break-word;
// Affects only placeholder in query field. Adds scrollbar only if content is cropped.
overflow: auto;
2018-06-11 10:36:45 -05:00
}
.slate-query-field__wrapper {
2018-06-11 10:36:45 -05:00
position: relative;
display: inline-block;
padding: 6px 8px;
min-height: $input-height;
2018-06-11 10:36:45 -05:00
width: 100%;
line-height: $line-height-base;
color: $text-color;
background-color: $input-bg;
2018-06-11 10:36:45 -05:00
background-image: none;
border: $input-border;
2018-06-11 10:36:45 -05:00
border-radius: $border-radius;
transition: all 0.3s;
2019-02-01 06:40:46 -06:00
line-height: $input-line-height;
2018-06-11 10:36:45 -05:00
}
.slate-query-field__wrapper--disabled {
background-color: inherit;
cursor: not-allowed;
}
2018-06-11 10:36:45 -05:00
.slate-typeahead {
.typeahead {
position: relative;
2020-04-23 04:46:13 -05:00
z-index: $zindex-typeahead;
2018-06-11 10:36:45 -05:00
border-radius: $border-radius;
border: $panel-border;
max-height: calc(66vh);
overflow-y: scroll;
overflow-x: hidden;
outline: none;
list-style: none;
background: $panel-bg;
color: $text-color;
box-shadow: $typeahead-shadow;
}
.typeahead-group__title {
color: $text-color-weak;
font-size: $font-size-sm;
line-height: $line-height-base;
padding: $space-sm;
2018-06-11 10:36:45 -05:00
}
.typeahead-item {
height: auto;
font-family: $font-family-monospace;
padding: $space-sm $space-sm $space-sm $space-md;
2018-06-11 10:36:45 -05:00
font-size: $font-size-sm;
text-overflow: ellipsis;
overflow: hidden;
z-index: 1;
display: block;
white-space: nowrap;
cursor: pointer;
transition: color 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), border-color 0.3s cubic-bezier(0.645, 0.045, 0.355, 1),
background 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), padding 0.15s cubic-bezier(0.645, 0.045, 0.355, 1);
}
.typeahead-item__selected {
background-color: $typeahead-selected-bg;
2018-06-12 10:12:03 -05:00
.typeahead-item-hint {
font-size: $font-size-xs;
color: $text-color;
white-space: normal;
2018-06-12 10:12:03 -05:00
}
2018-06-11 10:36:45 -05:00
}
.typeahead-match {
color: $typeahead-selected-color;
border-bottom: 1px solid $typeahead-selected-color;
// Undoing mark styling
padding: inherit;
background: inherit;
}
2018-06-11 10:36:45 -05:00
}
/* SYNTAX */
.slate-query-field {
.token.comment,
.token.block-comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: $text-color-weak;
}
.token.variable,
.token.entity {
color: $text-color;
2018-06-11 10:36:45 -05:00
}
.token.property,
.token.tag,
.token.constant,
.token.symbol,
.token.deleted {
color: $query-red;
}
.token.attr-value,
2018-06-11 10:36:45 -05:00
.token.selector,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
color: $query-green;
}
.token.boolean,
.token.number,
2018-06-11 10:36:45 -05:00
.token.operator,
.token.url {
2018-06-11 10:36:45 -05:00
color: $query-purple;
}
.token.function,
.token.attr-name,
.token.function-name,
2018-06-11 10:36:45 -05:00
.token.atrule,
.token.keyword,
.token.class-name {
color: $text-blue;
2018-06-11 10:36:45 -05:00
}
.token.punctuation,
2018-06-11 10:36:45 -05:00
.token.regex,
.token.important {
color: $query-orange;
}
.token.important {
font-weight: normal;
}
.token.bold {
font-weight: bold;
}
2018-06-11 10:36:45 -05:00
.token.italic {
font-style: italic;
}
.token.entity {
cursor: help;
}
.namespace {
opacity: 0.7;
}
}