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

153 lines
2.5 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 {
margin: 20px 0;
2022-04-26 20:20:50 +08:00
padding: 8px 24px;
2022-04-28 17:13:38 +08:00
.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;
.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;
}
}
}
2022-04-28 17:13:38 +08:00
}
}
2022-04-26 20:20:50 +08:00
}
.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-controls {
background: linear-gradient(90deg, rgba(255,255,255,0) 0%, $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(.editing-name) {
background: $color-concrete;
.step-element-grip,
.step-element-controls {
opacity: 1;
}
}
}