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
|
|
|
|
2017-02-28 21:32:23 +00:00
|
|
|
// This is the actual row
|
|
|
|
.key-value-editor__row-wrapper {
|
2017-02-28 06:26:24 +00:00
|
|
|
position: relative;
|
|
|
|
display: flex;
|
2017-02-28 21:32:23 +00:00
|
|
|
align-items: center;
|
2017-02-28 06:26:24 +00:00
|
|
|
flex-direction: row;
|
2017-02-28 21:32:23 +00:00
|
|
|
width: 100%;
|
2017-03-28 22:45:23 +00:00
|
|
|
padding-bottom: @padding-sm;
|
2017-02-28 21:32:23 +00:00
|
|
|
box-sizing: border-box;
|
2016-11-29 20:55:31 +00:00
|
|
|
|
2017-03-12 09:03:57 +00:00
|
|
|
&.key-value-editor__row-wrapper--disabled > * {
|
|
|
|
opacity: @opacity-subtle;
|
|
|
|
color: var(--hl) !important;
|
2017-03-28 22:45:23 +00:00
|
|
|
|
|
|
|
input, .input {
|
|
|
|
border-style: dashed;
|
|
|
|
}
|
2017-02-28 06:26:24 +00:00
|
|
|
}
|
|
|
|
|
2017-02-28 21:32:23 +00:00
|
|
|
&.key-value-editor__row-wrapper--dragging {
|
2017-02-28 06:26:24 +00:00
|
|
|
// Set opacity on children so we can still see the separator
|
|
|
|
& > * {
|
2017-02-28 21:32:23 +00:00
|
|
|
opacity: 0.2;
|
2017-02-28 06:26:24 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-02-28 21:32:23 +00:00
|
|
|
&.key-value-editor__row-wrapper--dragging-below::after,
|
|
|
|
&.key-value-editor__row-wrapper--dragging-above::before {
|
2017-02-28 06:26:24 +00:00
|
|
|
position: absolute;
|
|
|
|
height: 0;
|
|
|
|
right: 0;
|
|
|
|
left: 0;
|
|
|
|
border-bottom: 2px dotted var(--color-surprise);
|
|
|
|
content: " ";
|
|
|
|
display: block
|
|
|
|
}
|
|
|
|
|
2017-03-09 06:23:23 +00:00
|
|
|
// So the line appears on the next row
|
2017-02-28 21:32:23 +00:00
|
|
|
&.key-value-editor__row-wrapper--dragging-below::after {
|
2017-03-09 06:23:23 +00:00
|
|
|
bottom: -1px; // half border thickness
|
2017-02-28 06:26:24 +00:00
|
|
|
}
|
|
|
|
|
2017-03-09 06:23:23 +00:00
|
|
|
// So the line appears on the next row
|
2017-03-01 00:10:23 +00:00
|
|
|
&.key-value-editor__row-wrapper--dragging-above::before {
|
2017-03-09 06:23:23 +00:00
|
|
|
top: -1px; // half border thickness
|
2017-03-01 00:10:23 +00:00
|
|
|
}
|
|
|
|
|
2017-02-28 21:32:23 +00:00
|
|
|
// Style last row the same no matter if focused or not.
|
2017-03-01 21:15:56 +00:00
|
|
|
&.key-value-editor__row-wrapper--clicker input {
|
2017-02-28 21:32:23 +00:00
|
|
|
border-color: var(--hl-sm) !important;
|
|
|
|
}
|
|
|
|
}
|
2016-05-01 19:56:30 +00:00
|
|
|
|
2017-02-28 21:32:23 +00:00
|
|
|
.key-value-editor__drag {
|
2017-03-12 00:31:23 +00:00
|
|
|
padding-left: @padding-md;
|
|
|
|
padding-right: @padding-md;
|
|
|
|
box-sizing: border-box;
|
|
|
|
overflow: hidden;
|
|
|
|
|
2017-03-28 22:45:23 +00:00
|
|
|
// Remove hover effect
|
|
|
|
&, &:hover {
|
|
|
|
color: var(--hl-xl);
|
2017-02-28 21:32:23 +00:00
|
|
|
}
|
|
|
|
}
|
2016-07-20 23:16:28 +00:00
|
|
|
|
2017-02-28 21:32:23 +00:00
|
|
|
.key-value-editor__row {
|
|
|
|
width: 100%;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
align-items: stretch;
|
2017-03-12 00:31:23 +00:00
|
|
|
padding: 0 @padding-sm 0 0;
|
2017-02-28 21:32:23 +00:00
|
|
|
box-sizing: border-box;
|
|
|
|
|
2017-03-12 00:31:23 +00:00
|
|
|
// Pad the first form if there's no drag handle before it
|
2017-02-28 21:32:23 +00:00
|
|
|
&:first-child, &:first-child .form-control {
|
2017-03-12 00:31:23 +00:00
|
|
|
padding-left: @padding-md;
|
2017-02-28 21:32:23 +00:00
|
|
|
}
|
|
|
|
|
2017-03-01 00:10:23 +00:00
|
|
|
.form-control {
|
|
|
|
margin-bottom: 0;
|
2017-03-12 00:31:23 +00:00
|
|
|
|
|
|
|
&:first-child {
|
|
|
|
padding-left: 0;
|
|
|
|
}
|
2017-03-01 00:10:23 +00:00
|
|
|
}
|
|
|
|
|
2017-03-23 22:10:42 +00:00
|
|
|
input, .input {
|
2017-03-12 00:31:23 +00:00
|
|
|
margin: 0;
|
2017-02-28 21:32:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
& > * {
|
2017-03-12 09:03:57 +00:00
|
|
|
padding: 0 @padding-xs;
|
2016-11-22 19:42:10 +00:00
|
|
|
}
|
2016-05-01 19:56:30 +00:00
|
|
|
|
2016-11-23 19:33:24 +00:00
|
|
|
& > button,
|
|
|
|
.dropdown > button {
|
2016-11-22 19:42:10 +00:00
|
|
|
color: @hl;
|
2017-03-28 22:45:23 +00:00
|
|
|
margin: 0;
|
2016-05-01 19:56:30 +00:00
|
|
|
|
2016-11-22 19:42:10 +00:00
|
|
|
&:hover,
|
|
|
|
&:focus {
|
|
|
|
background: transparent;
|
|
|
|
}
|
2016-05-01 19:56:30 +00:00
|
|
|
|
2016-11-23 19:33:24 +00:00
|
|
|
&:hover,
|
|
|
|
&:focus {
|
2016-11-22 19:44:08 +00:00
|
|
|
color: inherit;
|
2016-05-01 19:56:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|