scinote-web/app/assets/stylesheets/steps.scss
2020-11-02 18:51:21 +01:00

462 lines
7.9 KiB
SCSS

// Place all the styles related to the Steps controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
// scss-lint:disable SelectorDepth
// scss-lint:disable NestingDepth
// scss-lint:disable SelectorFormat
// scss-lint:disable ImportantRule
// scss-lint:disable Unknown
@import "constants";
@import "mixins";
:root {
--attachment-column-width: 16em;
--attachment-row-height: 3em;
}
#new_step,
.panel-step-attachment {
ul {
list-style: none;
li {
> div > span.pull-left {
margin-top: 10px;
}
}
}
.checklist-name-container,
.table-name-container {
align-items: center;
display: flex;
.remove-container {
padding-top: 10px;
}
}
}
#steps {
// hack only for firefox
@-moz-document url-prefix() {
ul > li {
padding-top: 1px;
a > p:first-child {
margin-top: -17px;
}
}
}
.step {
.panel {
margin-left: 0;
}
}
.step-panel-collapse-link {
padding-left: 5px;
&:not(.collapsed) .fas {
@include rotate(90deg);
}
}
.step-heading {
align-items: center;
border: 0;
display: flex;
min-height: 46px;
padding-bottom: 0;
padding-top: 0;
.panel-options {
bottom: 0;
flex-grow: 1;
flex-shrink: 0;
line-height: 46px;
text-align: right;
}
span.step-number {
font-size: 16px;
font-weight: bold;
margin: 0 5px 0 10px;
min-width: fit-content;
}
.left-floats {
align-items: center;
display: flex;
max-width: 100%;
min-height: inherit;
overflow: hidden;
padding-right: 15px;
.step-name-link {
display: flex;
flex-shrink: 1;
overflow: hidden;
.name-block {
display: flex;
flex-shrink: 1;
height: 100%;
overflow: hidden;
@media (max-width: 1188px) {
min-width: 100px;
}
strong {
font-size: 16px;
white-space: nowrap;
}
}
.delimiter {
padding: 0 5px;
}
.author-block {
display: inline-block;
flex-shrink: 0;
font-size: 16px;
overflow: hidden;
white-space: nowrap;
}
}
}
}
}
.attachments {
display: grid;
grid-auto-rows: var(--attachment-row-height);
grid-column-gap: 1em;
grid-row-gap: 1em;
grid-template-columns: repeat(auto-fill, minmax(var(--attachment-column-width), 1fr));
justify-content: center;
margin: 1em 0;
.nested_fields {
display: contents;
}
}
.attachment-container {
@include md-card-style;
grid-row: span 6;
justify-self: center;
overflow: hidden;
padding: 1em;
position: relative;
width: var(--attachment-column-width);
.file-preview-link {
display: block;
height: 100%;
width: 100%;
}
.show-inline {
background: $color-white;
border-radius: $border-radius-default;
line-height: 1em;
padding: .5em;
position: absolute;
right: 0;
text-align: center;
top: 0;
width: 2em;
z-index: 10;
}
.attachment-preview {
border-radius: $border-radius-default;
color: $color-volcano;
height: 14em;
position: relative;
text-align: center;
width: 100%;
&.processing {
background-image: url("/images/medium/processing.gif");
background-position: center;
background-repeat: no-repeat;
}
img {
max-height: 100%;
max-width: 100%;
}
&.marvinjs {
&::before,
&::after {
border-radius: 1em 0 0 1em;
bottom: 1em;
content: "";
display: block;
height: 2em;
line-height: 2em;
position: absolute;
right: -1em;
width: 2.25em;
}
&::before {
background: $marvinjs-color;
}
&::after {
background-image: url("/images/icon_small/marvinjs-white.svg");
height: 2.25em;
right: -.75em;
width: 2em;
}
}
i.fas {
font-size: 100px;
line-height: 160px;
}
}
.no-shadow {
box-shadow: none;
}
.attachment-label,
.attachment-metadata {
background: $color-white;
overflow: hidden;
padding-top: 1em;
position: relative;
text-align: center;
text-overflow: ellipsis;
transition: $md-transaction;
white-space: nowrap;
}
.attachment-label {
@include font-main;
margin-top: 1.5em;
z-index: 2;
}
.attachment-metadata {
@include font-small;
color: $color-silver-chalice;
margin-top: -4em;
}
.remove-icon {
bottom: .5em;
cursor: pointer;
display: none;
position: absolute;
right: .5em;
}
&:hover {
box-shadow: $md-shadow;
.file-preview-link {
text-decoration: none;
}
.remove-icon {
display: inline-block;
}
.attachment-label,
.attachment-metadata {
margin-top: 0;
}
}
&.new {
border: 1px solid $brand-primary;
.dnd-error {
bottom: 15px;
float: left;
padding-left: 5px;
position: relative;
}
&::before {
background: $brand-primary;
border-radius: 0 $border-radius-default;
bottom: 0;
color: $color-white;
content: "NEW";
left: 0;
line-height: 20px;
position: absolute;
text-align: center;
width: 50px;
z-index: 2;
}
}
}
.attachments-actions {
align-items: center;
display: flex;
flex-wrap: wrap;
.title {
flex-grow: 1;
flex-shrink: 0;
}
.dropdown-attachment-options {
@include font-button;
min-width: 200px;
.divider-label {
@include font-small;
color: $color-alto;
padding-left: 1em;
}
a {
cursor: pointer;
padding: .5em 1em;
}
.change-order {
padding-left: 2.75em;
&.selected::after {
@include font-awesome;
content: $font-fas-check;
margin-left: auto;
position: absolute;
right: 1em;
}
}
.attachments-view-mode {
.fas {
width: 1.5em;
}
&.selected::after {
@include font-awesome;
content: $font-fas-check;
margin-left: auto;
position: absolute;
right: 1em;
}
}
}
}
.step .textarea-sm {
border-radius: 0;
}
.comments-title {
color: $color-emperor;
}
.expand-all-steps {
margin: 0 0 15px 15px;
}
.inline-attachment-container {
@include md-card-style;
grid-column: 1/-1;
grid-row: span 12;
.active-iframe-preview {
border: 0;
height: calc(100% - 4em);
width: 100%;
}
.image-container,
.general-file-container {
align-items: center;
background: $color-concrete;
display: flex;
height: calc(100% - 4em);
justify-content: center;
padding: .5em;
width: 100%;
img {
max-height: 100%;
max-width: 100%;
}
.fas {
font-size: 10em;
}
}
.header {
align-items: center;
display: flex;
height: 4em;
padding: 0 1em;
.show-as-thumbnail {
cursor: pointer;
margin-left: auto;
}
.file-name {
@include font-main;
color: $brand-primary;
}
.file-metadata {
@include font-small;
color: $color-silver-chalice;
display: grid;
grid-column-gap: 1em;
grid-template-columns: max-content max-content;
}
}
}
.list-attachment-container {
@include md-card-style;
align-items: center;
display: flex;
grid-column: 1/-1;
padding: .5em;
.file-icon {
@include font-main;
}
.file-name {
@include font-main;
color: $brand-primary;
margin: 0 .5em;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.file-metadata {
@include font-small;
color: $color-silver-chalice;
display: grid;
grid-column-gap: 1em;
grid-template-columns: max-content max-content;
}
}