mirror of
https://github.com/Kong/insomnia
synced 2024-11-12 17:26:32 +00:00
1770319ac2
* Created css vars for every less var * Finish converting Less var to CSS vars
111 lines
2.2 KiB
Plaintext
111 lines
2.2 KiB
Plaintext
.key-value-editor {
|
|
padding: var(--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-bottom: var(--padding-sm);
|
|
box-sizing: border-box;
|
|
|
|
&.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 {
|
|
width: var(--line-height-sm);
|
|
min-width: var(--line-height-sm);
|
|
text-align: center;
|
|
box-sizing: border-box;
|
|
overflow: hidden;
|
|
|
|
// Remove hover effect
|
|
&,
|
|
&:hover {
|
|
color: var(--hl);
|
|
}
|
|
}
|
|
|
|
.key-value-editor__row {
|
|
width: 100%;
|
|
min-width: 0;
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: stretch;
|
|
padding: 0 var(--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: var(--padding-md);
|
|
}
|
|
|
|
.form-control {
|
|
margin-bottom: 0;
|
|
|
|
&:first-child {
|
|
padding-left: 0;
|
|
}
|
|
}
|
|
|
|
input,
|
|
.input {
|
|
margin: 0;
|
|
}
|
|
|
|
& > * {
|
|
padding: 0 var(--padding-xs);
|
|
}
|
|
|
|
& > button,
|
|
.dropdown > button {
|
|
color: var(--hl);
|
|
margin: 0;
|
|
|
|
&:hover,
|
|
&:focus {
|
|
background: transparent;
|
|
}
|
|
|
|
&:hover,
|
|
&:focus {
|
|
color: inherit;
|
|
}
|
|
}
|
|
}
|
|
}
|