insomnia/app/ui/css/components/key-value-editor.less
Gregory Schier e2c72987e8 Autocomplete for variables and tags (#112)
* Fixed duplication kve bug

* Autocomplete sort of works now

* Even better

* Styled autocomplete dropdown

* Minor tweaks

* Autocomplete looking pretty spiffy

* Bug fixes

* Apply dropdown to all editors

* Fixed key propagation when autocomplete open

* Fixed some modals

* Split up editor less

* Some css improvements

* Move filter help out of editor

* Fixed drag-n-drop

* Perfected autocomplete theme

* "fixed" one-line-editor hint click bug

* Better autocomplete and switch single line input on drag enter

* Don't autocomplete on Tab

* Better tag dnd

* Add constants completion API

* Autocomplete headers

* Fixed tests
2017-03-11 16:31:23 -08:00

122 lines
2.6 KiB
Plaintext

@import '../constants/dimensions';
@import '../constants/colors';
.key-value-editor {
margin-top: 2px;
padding: @padding-md 0;
// This is the actual row
.key-value-editor__row-wrapper {
position: relative;
display: flex;
align-items: center;
flex-direction: row;
width: 100%;
padding-top: @padding-xs;
padding-bottom: @padding-xs;
box-sizing: border-box;
&.key-value-editor__row-wrapper--disabled .input,
&.key-value-editor__row-wrapper--disabled button {
text-decoration: line-through;
opacity: 0.4;
}
&.key-value-editor__row-wrapper--dragging {
// Set opacity on children so we can still see the separator
& > * {
opacity: 0.2;
}
}
&.key-value-editor__row-wrapper--dragging-below::after,
&.key-value-editor__row-wrapper--dragging-above::before {
position: absolute;
height: 0;
right: 0;
left: 0;
border-bottom: 2px dotted var(--color-surprise);
content: " ";
display: block
}
// So the line appears on the next row
&.key-value-editor__row-wrapper--dragging-below::after {
bottom: -1px; // half border thickness
}
// So the line appears on the next row
&.key-value-editor__row-wrapper--dragging-above::before {
top: -1px; // half border thickness
}
// Style last row the same no matter if focused or not.
&.key-value-editor__row-wrapper--clicker input {
border-color: var(--hl-sm) !important;
}
}
.key-value-editor__drag {
padding-left: @padding-md;
padding-right: @padding-md;
box-sizing: border-box;
overflow: hidden;
color: var(--hl-lg) !important;
&:hover {
color: var(--hl-lg) !important;
}
}
.key-value-editor__row {
width: 100%;
display: flex;
flex-direction: row;
align-items: stretch;
padding: 0 @padding-sm 0 0;
box-sizing: border-box;
// Pad the first form if there's no drag handle before it
&:first-child, &:first-child .form-control {
padding-left: @padding-md;
}
.form-control {
margin-bottom: 0;
&:first-child {
padding-left: 0;
}
}
input,
.input {
margin: 0;
background-color: transparent;
height: @line-height-sm;
box-sizing: border-box;
padding-left: @padding-xs;
padding-right: @padding-xs;
}
& > * {
padding: 0 @padding-sm;
}
& > button,
.dropdown > button {
color: @hl;
&:hover,
&:focus {
background: transparent;
}
&:hover,
&:focus {
color: inherit;
}
}
}
}