insomnia/app/ui/css/components/key-value-editor.less

118 lines
2.4 KiB
Plaintext
Raw Normal View History

2016-05-01 19:56:30 +00:00
@import '../constants/dimensions';
@import '../constants/colors';
.key-value-editor {
2016-08-29 17:58:59 +00:00
padding: @padding-md 0;
2016-05-01 20:46:11 +00:00
// This is the actual row
.key-value-editor__row-wrapper {
position: relative;
display: flex;
align-items: center;
flex-direction: row;
width: 100%;
padding-bottom: @padding-sm;
box-sizing: border-box;
&.key-value-editor__row-wrapper--disabled > * {
opacity: @opacity-subtle;
color: var(--hl) !important;
input, .input {
border-style: dashed;
}
}
&.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;
}
}
2016-05-01 19:56:30 +00:00
.key-value-editor__drag {
padding-left: @padding-md;
padding-right: @padding-md;
box-sizing: border-box;
overflow: hidden;
// Remove hover effect
&, &:hover {
2017-03-29 02:21:49 +00:00
color: var(--hl);
}
}
2016-07-20 23:16:28 +00:00
.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;
}
& > * {
padding: 0 @padding-xs;
}
2016-05-01 19:56:30 +00:00
& > button,
.dropdown > button {
color: @hl;
margin: 0;
2016-05-01 19:56:30 +00:00
&:hover,
&:focus {
background: transparent;
}
2016-05-01 19:56:30 +00:00
&:hover,
&:focus {
2016-11-22 19:44:08 +00:00
color: inherit;
2016-05-01 19:56:30 +00:00
}
}
}
}