scinote-web/app/assets/stylesheets/steps/step.scss

365 lines
6.3 KiB
SCSS
Raw Normal View History

2022-04-26 20:20:50 +08:00
// scss-lint:disable SelectorDepth
// scss-lint:disable NestingDepth
2022-05-06 17:59:22 +08:00
@import "components/*";
2022-04-28 17:13:38 +08:00
.step-container {
--left-component-padding: 24px;
2022-05-25 21:04:14 +08:00
border: $border-transparent;
2022-07-05 18:49:12 +08:00
margin: 6px 0 6px -1.5em;
2022-06-21 17:32:27 +08:00
padding: 8px 24px 8px 0;
2022-04-28 17:13:38 +08:00
.step-header {
2022-07-11 16:45:25 +08:00
align-items: flex-start;
2022-04-28 17:13:38 +08:00
display: flex;
margin-bottom: 1.2em;
2022-04-28 17:13:38 +08:00
2022-07-11 16:45:25 +08:00
.step-element-header {
border-radius: 4px;
flex-basis: 80%;
position: relative;
2022-04-28 17:13:38 +08:00
2022-07-11 16:45:25 +08:00
.step-name-edit-icon {
display: none;
position: absolute;
right: -8px;
top: -6px;
2022-07-11 16:45:25 +08:00
}
&:hover .step-name-edit-icon {
cursor: pointer;
display: inline-block;
margin-right: 16px;
margin-top: 16px;
2022-04-28 17:13:38 +08:00
}
2022-07-11 16:45:25 +08:00
.step-collapse-link {
display: inline-block;
flex-shrink: 0;
line-height: 24px;
text-align: center;
width: 24px;
&:not(.collapsed) {
@include rotate(90deg);
2022-04-28 17:13:38 +08:00
}
}
}
.strikethrough {
text-decoration: line-through;
&:hover {
text-decoration: initial;
}
}
2022-04-28 17:13:38 +08:00
.step-position {
@include font-main;
2022-06-09 20:40:45 +08:00
flex-shrink: 0;
2022-07-05 18:49:12 +08:00
font-weight: bold;
2022-04-28 17:13:38 +08:00
line-height: 24px;
margin: 0 4px;
}
.step-name-container {
flex-grow: 1;
font-size: 16px;
2022-07-05 18:49:12 +08:00
font-weight: bold;
textarea {
text-decoration: initial;
}
}
2022-07-11 16:45:25 +08:00
.step-state {
border: 2px solid $color-alto;
border-radius: 50%;
cursor: pointer;
height: 24px;
text-align: center;
width: 24px;
&:hover {
border-color: $brand-success;
}
&.completed {
background: $brand-success;
border: 2px solid $brand-success;
&::after {
@include font-awesome;
color: $color-white;
content: $font-fas-check;
2022-07-11 16:45:25 +08:00
}
}
2022-04-28 17:13:38 +08:00
}
.step-actions-container {
display: flex;
justify-content: flex-end;
2022-07-11 16:45:25 +08:00
flex-basis: 20%;
2022-07-13 21:15:01 +08:00
.disabled {
color: $color-silver-chalice;
pointer-events: none;
}
.dropdown-menu {
white-space: nowrap;
}
.insert-button {
.caret {
margin-left: .5em;
}
}
.insert-element-dropdown {
@include font-button;
min-width: 230px;
padding: 0;
li {
padding: .5em 1em;
&.action {
cursor: pointer;
&:hover {
background: $color-concrete;
}
.fas {
margin-right: .5em;
}
}
&.title {
@include font-small;
color: $color-alto;
text-transform: uppercase;
}
}
}
2022-04-28 17:13:38 +08:00
}
}
2022-05-25 21:04:14 +08:00
2022-06-21 17:32:27 +08:00
.step-elements {
padding-left: calc(var(--left-component-padding) * 2);
.step-element-name {
.sci-inline-edit__view {
margin-bottom: .25em;
padding-top: .25em;
}
.sci-inline-edit__content textarea {
margin-bottom: .25em;
margin-top: .25em;
}
}
2022-07-13 21:15:01 +08:00
}
2022-07-13 21:15:01 +08:00
.step-element-grip-placeholder {
height: 24px;
width: 28px;
2022-06-21 17:32:27 +08:00
}
2022-05-25 21:04:14 +08:00
.comments-counter {
@include font-small;
align-items: center;
background-color: $color-concrete;
border: 2px solid $color-white;
border-radius: 8px;
display: flex;
height: 16px;
justify-content: center;
margin: 2px;
min-width: 16px;
position: absolute;
right: 0;
top: 0;
&.unseen {
background-color: $brand-complementary;
}
}
&.showing-comments {
border: 1px dotted $brand-primary;
}
2022-05-24 21:54:22 +08:00
.drop-message {
@include font-h3;
align-items: center;
color: $brand-primary;
display: none;
height: 100%;
justify-content: center;
left: 0;
position: absolute;
top: 0;
width: 100%;
}
&.draging-file {
background-color: $brand-focus-light;
position: relative;
.drop-message {
display: flex;
flex-direction: column;
.storage-usage {
pointer-events: none;
}
2022-05-24 21:54:22 +08:00
}
> *:not(.drop-message) {
2022-05-24 21:54:22 +08:00
opacity: 0;
pointer-events: none;
}
}
.storage-usage {
@include font-small;
color: $color-black;
.progress-container {
background-color: $color-white;
border-radius: 2px;
height: 4px;
margin: 1em 0;
overflow: hidden;
position: relative;
.progress-bar {
background-color: $brand-primary;
height: 100%;
position: relative;
transition: 1s $timing-function-sharp;
}
}
}
2022-04-26 20:20:50 +08:00
}
.step-element-header {
align-items: flex-start;
border-radius: 4px;
display: flex;
min-height: 40px;
position: relative;
&.editing-name {
.step-element-controls {
display: none;
}
}
2022-07-11 16:45:25 +08:00
.step-controls {
display: flex;
align-items: center;
min-height: 35px;
2022-07-11 16:45:25 +08:00
}
.sci-inline-edit {
width: 100%;
}
.step-element-name {
font-weight: bold;
width: 100%;
2022-07-13 21:15:01 +08:00
.step-element-number {
display: inline-block;
margin-right: 8px;
}
}
.step-element-controls {
2022-05-24 21:54:22 +08:00
background: linear-gradient(
90deg,
transparent,
$color-concrete 15%,
$color-concrete 100%
);
display: flex;
margin-left: auto;
position: absolute;
2022-06-09 20:40:45 +08:00
right: 0;
top: 0;
.fas {
font-size: 14px;
}
}
.step-element-controls,
.step-element-grip {
opacity: 0;
}
&:hover:not(.locked) {
background: $color-concrete;
.step-element-grip,
.step-element-controls {
opacity: 1;
}
}
}
.step-element-grip {
color: $color-silver-chalice;
cursor: pointer;
margin: auto;
padding: .5em;
&.step-element-grip--draggable {
cursor: grab;
}
&.step-element-grip--disabled {
pointer-events: none;
.fas { opacity: 0; }
}
}
.sci-reorderable-items {
.modal-body {
padding-top: 0;
}
.step-element-header {
align-items: center;
border-bottom: 1px solid $color-concrete;
&:hover:not(.locked) {
background-color: $color-white;
}
.step-element-name {
font-weight: normal;
2022-07-13 21:15:01 +08:00
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.step-element-name-placeholder {
color: $color-silver-chalice;
}
.fas {
margin-right: 0.5em;
}
}
}
.step-element--locked {
pointer-events: none;
}