This way we can simplify the HTML and easily apply font awesome icons to
any element.
Note the mixin uses `extend`, which we generally try to avoid. It's OK
in this case, since `fa-` classes only have one rule, affecting the
content of its `::before` pseudo-element. Unfortunately we can't use
`include fa-content($fa-var-#{$icon})` because it's not valid SCSS. We
could make the mixin accept an icon instead of an icon name, and call it
using `has-fa-icon(r, $fa-var-plus-square)`. However, IMHO that would
make the code a bit more complex with no real benefit.
166 lines
2.6 KiB
SCSS
166 lines
2.6 KiB
SCSS
// Table of Contents
|
|
//
|
|
// 01. Logo
|
|
// 02. Side menu and content
|
|
// 03. Orbit bullets
|
|
// 04. Direct uploads
|
|
// ------------------
|
|
|
|
// 01. Logo
|
|
// --------
|
|
|
|
@mixin logo {
|
|
color: #fff;
|
|
display: inline-block;
|
|
font-family: "Lato" !important;
|
|
font-size: rem-calc(24);
|
|
font-weight: lighter;
|
|
|
|
@include breakpoint(medium) {
|
|
line-height: $line-height * 2;
|
|
margin-top: 0;
|
|
}
|
|
}
|
|
|
|
// 02. Side menu and content
|
|
// -------------------------
|
|
|
|
@mixin side-menu-and-content {
|
|
display: flex;
|
|
|
|
> :first-child {
|
|
flex: 25%;
|
|
min-width: 250px;
|
|
|
|
> :first-child {
|
|
height: 100%;
|
|
}
|
|
}
|
|
|
|
> :last-child {
|
|
flex: 75%;
|
|
overflow-x: auto;
|
|
padding: $line-height !important;
|
|
}
|
|
}
|
|
|
|
// 03. Orbit bullet
|
|
// ----------------
|
|
|
|
@mixin orbit-bullets {
|
|
@include disable-mouse-outline;
|
|
position: relative;
|
|
margin-top: $orbit-bullet-margin-top;
|
|
margin-bottom: $orbit-bullet-margin-bottom;
|
|
text-align: center;
|
|
|
|
button {
|
|
width: $orbit-bullet-diameter;
|
|
height: $orbit-bullet-diameter;
|
|
margin: $orbit-bullet-margin;
|
|
|
|
border-radius: 50%;
|
|
background-color: $orbit-bullet-background;
|
|
|
|
&:hover {
|
|
background-color: $orbit-bullet-background-active;
|
|
}
|
|
|
|
&.is-active {
|
|
background-color: $orbit-bullet-background-active;
|
|
}
|
|
}
|
|
}
|
|
|
|
// 04. Direct uploads
|
|
// ------------------
|
|
|
|
@mixin direct-uploads {
|
|
|
|
.cached-image {
|
|
max-width: rem-calc(150);
|
|
max-height: rem-calc(150);
|
|
}
|
|
|
|
.progress-bar-placeholder {
|
|
display: none;
|
|
margin-bottom: $line-height;
|
|
}
|
|
|
|
.document,
|
|
.image {
|
|
|
|
.document-attachment,
|
|
.image-attachment {
|
|
padding-left: 0;
|
|
|
|
p {
|
|
margin-bottom: 0;
|
|
}
|
|
}
|
|
|
|
.attachment-errors {
|
|
|
|
> .js-image-attachment,
|
|
> .js-document-attachment {
|
|
display: none;
|
|
|
|
~ .error {
|
|
display: inline-block;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.button {
|
|
font-weight: normal;
|
|
}
|
|
|
|
.progress-bar {
|
|
width: 100%;
|
|
background-color: $light-gray;
|
|
}
|
|
|
|
.file-name {
|
|
margin-top: 0;
|
|
}
|
|
|
|
.loading-bar {
|
|
height: 5px;
|
|
width: 0;
|
|
transition: width 500ms ease-out;
|
|
|
|
&.uploading {
|
|
background-color: $dark-gray;
|
|
}
|
|
|
|
&.complete {
|
|
background-color: $success-color;
|
|
}
|
|
|
|
&.errors {
|
|
background-color: $alert-color;
|
|
margin-top: $line-height / 2;
|
|
}
|
|
}
|
|
|
|
.loading-bar.no-transition {
|
|
transition: none;
|
|
}
|
|
}
|
|
|
|
@mixin has-fa-icon($icon, $style) {
|
|
@extend .fa-#{$icon};
|
|
|
|
&::before {
|
|
@extend %fa-icon;
|
|
font-family: "Font Awesome 5 Free";
|
|
|
|
@if $style == "r" {
|
|
font-weight: normal;
|
|
} @else {
|
|
font-weight: bold;
|
|
}
|
|
}
|
|
}
|