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

250 lines
4.5 KiB
SCSS
Raw Normal View History

2022-04-26 20:20:50 +08:00
// scss-lint:disable SelectorDepth
// scss-lint:disable NestingDepth
2023-07-06 19:19:28 +08:00
@import "components/text";
2022-05-06 17:59:22 +08:00
2022-04-28 17:13:38 +08:00
.step-container {
.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 {
align-items: flex-start;
2023-06-15 21:12:51 +08:00
display: flex;
flex-basis: 100%;
position: relative;
2023-09-14 18:12:15 +08:00
gap: .25rem;
2022-04-28 17:13:38 +08:00
2022-07-11 16:45:25 +08:00
.step-name-edit-icon {
background: linear-gradient(90deg,
transparent,
$color-concrete 15%,
$color-concrete 100%);
cursor: pointer;
opacity: 0;
position: absolute;
right: 0;
top: 0;
&:hover {
background: $color-concrete;
}
2022-07-11 16:45:25 +08:00
}
&:hover .step-name-edit-icon {
opacity: 1;
2022-04-28 17:13:38 +08:00
}
2022-07-11 16:45:25 +08:00
.step-collapse-link {
display: flex;
2022-07-11 16:45:25 +08:00
flex-shrink: 0;
line-height: 24px;
text-align: center;
width: 24px;
&:not(.collapsed) {
@include rotate(90deg);
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;
}
.step-name-container {
align-self: baseline;
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 {
align-self: center;
2023-08-09 17:01:20 +08:00
background-color: var(--sn-light-grey);
border: 1px solid transparent;
border-radius: 50%;
cursor: pointer;
2023-09-11 18:03:17 +08:00
height: 20px;
2023-08-09 17:01:20 +08:00
position: relative;
text-align: center;
2023-09-11 18:03:17 +08:00
width: 20px;
2023-08-09 17:01:20 +08:00
&::after {
@include font-sn-icon;
color: $color-white;
content: $sn-icon-check;
position: absolute;
2023-09-11 18:03:17 +08:00
font-size: 18px !important;
left: 0;
height: 20px;
top: -3px;
}
&.completed {
2023-08-09 17:01:20 +08:00
background: var(--sn-science-blue);
border: 1px solid var(--sn-science-blue);
2022-07-11 16:45:25 +08:00
}
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 {
2023-09-14 18:12:15 +08:00
padding-left: 2.5rem;
padding-right: 2.5rem;
2023-02-03 15:12:33 +08:00
.step-timestamp {
position: relative;
margin-left: 40px;
2023-02-03 17:38:03 +08:00
bottom: 17px;
2023-02-03 15:12:33 +08:00
width: 356px;
height: 15px;
font-style: normal;
font-weight: 400;
font-size: 10px;
line-height: 14px;
flex: none;
order: 0;
flex-grow: 0;
}
2022-07-13 21:15:01 +08:00
}
2022-07-13 21:15:01 +08:00
.step-element-grip-placeholder {
width: 42px;
2022-06-21 17:32:27 +08:00
}
2022-05-25 21:04:14 +08:00
.comments-counter {
align-items: center;
background: var(--sn-grey);
border-radius: .5rem;
color: $color-white;
2022-05-25 21:04:14 +08:00
display: flex;
font-size: 10px;
2022-05-25 21:04:14 +08:00
height: 16px;
justify-content: center;
margin: 2px;
min-width: 16px;
position: absolute;
right: 0;
top: 0;
&.unseen {
background-color: var(--sn-science-blue);
2022-05-25 21:04:14 +08:00
}
}
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;
}
}
2023-10-19 23:41:13 +08:00
}
2023-10-19 23:41:13 +08:00
.storage-usage {
@include font-small;
align-self: center;
color: $color-black;
display: flex;
margin-top: 1em;
width: 400px;
.progress-container {
background-color: $color-white;
border-radius: 2px;
flex-grow: 1;
height: 4px;
margin: 1em 1em 1em 0;
overflow: hidden;
position: relative;
2023-10-19 23:41:13 +08:00
.progress-bar {
background-color: $brand-primary;
height: 100%;
position: relative;
2023-10-19 23:41:13 +08:00
transition: 1s $timing-function-sharp;
}
2023-10-19 23:41:13 +08:00
}
2023-10-19 23:41:13 +08:00
.progress-message {
line-height: 2em;
}
2022-04-26 20:20:50 +08:00
}
.step-element-grip {
color: $color-silver-chalice;
cursor: pointer;
padding: .5em;
&.step-element-grip--draggable {
cursor: grab;
}
&.step-element-grip--disabled {
pointer-events: none;
.fas { opacity: 0; }
}
}
.sci-reorderable-items {
.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;
}