scinote-web/app/assets/stylesheets/steps/step.scss
artoscinote 23872f519b
Implement step element sorting modal [SCI-6849] (#4124)
* Implement step element sorting modal [SCI-6849]

* Implement step reordering modal [SCI-6850]

* Refactor reorderable items a bit [SCI-6850]
2022-05-30 13:45:51 +02:00

264 lines
4.4 KiB
SCSS

// scss-lint:disable SelectorDepth
// scss-lint:disable NestingDepth
@import "components/*";
.step-container {
border: $border-transparent;
margin: 20px 0 20px -1.5em;
padding: 8px 24px;
.step-header {
align-items: center;
display: flex;
.step-collapse-link {
display: inline-block;
line-height: 24px;
text-align: center;
width: 24px;
&:not(.collapsed) {
@include rotate(90deg);
}
}
.step-state {
border: 2px solid $color-alto;
border-radius: 50%;
cursor: pointer;
height: 24px;
text-align: center;
width: 24px;
&.completed {
background: $brand-success;
border: 2px solid $brand-success;
&::after {
@include font-awesome;
color: $color-white;
content: $font-fas-check;
}
}
}
.step-position {
@include font-main;
line-height: 24px;
margin: 0 4px;
}
.step-name-container {
flex-grow: 1;
}
.step-actions-container {
display: flex;
justify-content: flex-end;
.dropdown-menu {
white-space: nowrap;
}
.insert-button {
.caret {
margin-left: .5em;
}
}
.insert-element-dropdown {
@include font-button;
padding: 0;
li {
padding: .5em 1em;
&.action {
cursor: pointer;
&:hover {
background: $color-concrete;
}
}
&.title {
@include font-small;
color: $color-alto;
text-transform: uppercase;
}
}
}
}
}
.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;
}
.drop-message {
@include font-h3;
align-items: center;
color: $brand-primary;
display: none;
height: 100%;
justify-content: center;
left: 0;
pointer-events: none;
position: absolute;
top: 0;
width: 100%;
}
&.draging-file {
background-color: $brand-focus-light;
position: relative;
.drop-message {
display: flex;
flex-direction: column;
}
> *:not(.drop-message) {
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;
}
}
}
}
.step-element-header {
align-items: center;
display: flex;
min-height: 40px;
padding: 0 0 0 8px;
position: relative;
padding: 8px;
&.editing-name {
.step-element-controls {
display: none;
}
}
.sci-inline-edit {
width: 100%;
}
.step-element-name {
font-weight: bold;
width: 100%;
.step-element-number {
display: inline-block;
margin-right: 8px;
}
}
.step-element-controls {
background: linear-gradient(
90deg,
transparent,
$color-concrete 15%,
$color-concrete 100%
);
display: flex;
margin-left: auto;
position: absolute;
right: 4px;
top: 4px;
.btn {
height: 32px;
width: 32px;
padding: 0;
}
.fas {
font-size: 14px;
}
}
.step-element-grip {
color: $color-silver-chalice;
cursor: grab;
margin-right: 8px;
}
.step-element-controls,
.step-element-grip {
opacity: 0;
}
&:hover:not(.locked) {
background: $color-concrete;
.step-element-grip,
.step-element-controls {
opacity: 1;
}
}
}
.sci-reorderable-items {
.modal-body {
padding-top: 0;
}
.step-element-header {
border-bottom: 1px solid $color-concrete;
&:hover:not(.locked) {
background-color: $color-white;
}
.step-element-name {
font-weight: normal;
}
.fas {
margin-right: 0.5em;
}
}
}