insomnia/app/ui/css/components/keyvalueeditor.less
Gregory Schier c1e9e718e9 Perf/one line input hybrid (#100)
* Fixed duplication kve bug

* one-line-input now defaults to <input>

* Fixed urlbar width

* Removed all boolean flags

* Fixed some edge cases

* I think it's good

* A bunch more fixes too

* Fixed querystring with hashes
2017-03-01 13:15:56 -08:00

111 lines
2.3 KiB
Plaintext

@import '../constants/dimensions';
@import '../constants/colors';
.key-value-editor {
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-left: @padding-md;
margin-top: @padding-xs;
margin-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
}
&.key-value-editor__row-wrapper--dragging-below::after {
// So the line appears on the next row
top: 100%;
}
&.key-value-editor__row-wrapper--dragging-above::before {
// So the line appears on the next row
bottom: 100%;
}
// 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 {
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;
box-sizing: border-box;
// Don't pad the first form if there's nothing before it
// eg. When no drag handles present
&:first-child, &:first-child .form-control {
padding-left: 0;
}
.form-control {
margin-bottom: 0;
}
.input {
background-color: transparent;
height: @line-height-sm;
box-sizing: border-box;
margin: 0;
}
& > * {
padding: 0 @padding-sm;
}
& > button,
.dropdown > button {
color: @hl;
&:hover,
&:focus {
background: transparent;
}
&:hover,
&:focus {
color: inherit;
}
}
}
}