Reorganize Styles (#45)
This commit is contained in:
5
src/styles/components/base/_all.scss
Normal file
5
src/styles/components/base/_all.scss
Normal file
@ -0,0 +1,5 @@
|
||||
@import 'card';
|
||||
@import 'fancycheckbox';
|
||||
@import 'multiselect';
|
||||
@import 'scrollbars';
|
||||
@import 'tooltip';
|
22
src/styles/components/base/card.scss
Normal file
22
src/styles/components/base/card.scss
Normal file
@ -0,0 +1,22 @@
|
||||
.card {
|
||||
background-color: rgba($grey-lighter, 0.075);
|
||||
border-radius: $radius;
|
||||
margin-bottom: 1rem;
|
||||
|
||||
.card-image {
|
||||
img {
|
||||
border-radius: $radius $radius 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
.card-header {
|
||||
box-shadow: none;
|
||||
border-bottom: 1px solid $grey-lighter;
|
||||
border-radius: $radius $radius 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
.box,.card{
|
||||
border: $thickness solid $border;
|
||||
box-shadow: 0.3em 0.3em 0.8em darken($light, 6);
|
||||
}
|
67
src/styles/components/base/fancycheckbox.scss
Normal file
67
src/styles/components/base/fancycheckbox.scss
Normal file
@ -0,0 +1,67 @@
|
||||
|
||||
// Fancy Checkboxes
|
||||
.fancycheckbox {
|
||||
display: inline-block;
|
||||
padding-right: 5px;
|
||||
padding-top: 3px;
|
||||
|
||||
&.is-block {
|
||||
margin: .5em .2em;
|
||||
}
|
||||
|
||||
.check {
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
margin: auto;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
transform: translate3d(0, 0, 0);
|
||||
|
||||
&:hover svg {
|
||||
stroke: $primary;
|
||||
}
|
||||
|
||||
span {
|
||||
font-size: 0.8em;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
svg {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
fill: none;
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: round;
|
||||
stroke: #c8ccd4;
|
||||
stroke-width: 1.5;
|
||||
transform: translate3d(0, 0, 0);
|
||||
transition: all 0.2s ease;
|
||||
|
||||
path {
|
||||
stroke-dasharray: 60;
|
||||
stroke-dashoffset: 0;
|
||||
}
|
||||
|
||||
polyline {
|
||||
stroke-dasharray: 22;
|
||||
stroke-dashoffset: 66;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
input[type=checkbox]:checked + .check svg {
|
||||
stroke: $primary;
|
||||
}
|
||||
|
||||
input[type=checkbox]:checked + .check svg path {
|
||||
stroke-dashoffset: 60;
|
||||
transition: all 0.3s linear;
|
||||
}
|
||||
|
||||
input[type=checkbox]:checked + .check svg polyline {
|
||||
stroke-dashoffset: 42;
|
||||
transition: all 0.2s linear;
|
||||
transition-delay: 0.15s;
|
||||
}
|
||||
}
|
458
src/styles/components/base/multiselect.scss
Normal file
458
src/styles/components/base/multiselect.scss
Normal file
@ -0,0 +1,458 @@
|
||||
fieldset[disabled] .multiselect {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.multiselect__spinner {
|
||||
position: absolute;
|
||||
right: 1px;
|
||||
top: 1px;
|
||||
width: 48px;
|
||||
height: 35px;
|
||||
background: $white;
|
||||
display: block;
|
||||
|
||||
&:before, &:after {
|
||||
position: absolute;
|
||||
content: "";
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin: -8px 0 0 -8px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border-radius: 100%;
|
||||
border-color: $multiselect_primary transparent transparent;
|
||||
border-style: solid;
|
||||
border-width: 2px;
|
||||
box-shadow: 0 0 0 1px transparent;
|
||||
}
|
||||
&:before {
|
||||
animation: spinning 2.4s cubic-bezier(0.41, 0.26, 0.2, 0.62);
|
||||
animation-iteration-count: infinite;
|
||||
}
|
||||
&:after {
|
||||
animation: spinning 2.4s cubic-bezier(0.51, 0.09, 0.21, 0.8);
|
||||
animation-iteration-count: infinite;
|
||||
}
|
||||
}
|
||||
|
||||
.multiselect__loading-enter-active, .multiselect__loading-leave-active {
|
||||
transition: opacity 0.4s ease-in-out;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.multiselect__loading-enter, .multiselect__loading-leave-active {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.multiselect, .multiselect__input, .multiselect__single {
|
||||
font-family: inherit;
|
||||
font-size: 16px;
|
||||
touch-action: manipulation;
|
||||
}
|
||||
|
||||
.multiselect {
|
||||
box-sizing: content-box;
|
||||
display: block;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
min-height: 40px;
|
||||
text-align: left;
|
||||
color: $text;
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
&:focus {
|
||||
outline: none;
|
||||
}
|
||||
}
|
||||
|
||||
.multiselect--disabled {
|
||||
pointer-events: none;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.multiselect--active {
|
||||
z-index: 50;
|
||||
&:not(.multiselect--above) {
|
||||
.multiselect__current, .multiselect__input, .multiselect__tags {
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
}
|
||||
.multiselect__select {
|
||||
transform: rotateZ(180deg);
|
||||
}
|
||||
}
|
||||
|
||||
.multiselect--above.multiselect--active {
|
||||
.multiselect__current, .multiselect__input, .multiselect__tags {
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.multiselect__input, .multiselect__single {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
min-height: 20px;
|
||||
line-height: 20px;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
background: $white;
|
||||
padding: 0 0 0 5px;
|
||||
width: calc(100%);
|
||||
transition: border 0.1s ease;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 8px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.multiselect__input::placeholder {
|
||||
color: $multiselect-dark;
|
||||
}
|
||||
|
||||
.multiselect__tag ~ {
|
||||
.multiselect__input, .multiselect__single {
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.multiselect__input:hover, .multiselect__single:hover {
|
||||
border-color: darken($white, 10);
|
||||
}
|
||||
|
||||
.multiselect__input:focus {
|
||||
border-color: $primary;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.multiselect__single {
|
||||
&:focus {
|
||||
border-color: $primary;
|
||||
outline: none;
|
||||
}
|
||||
padding-left: 5px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.multiselect__tags-wrap {
|
||||
display: inline;
|
||||
|
||||
.user {
|
||||
display: inline-block;
|
||||
min-height: 30px;
|
||||
margin: 0 0 .5em;
|
||||
}
|
||||
}
|
||||
|
||||
.multiselect__tags {
|
||||
min-height: 40px;
|
||||
display: block;
|
||||
padding: 8px 40px 0 8px;
|
||||
border-radius: 5px;
|
||||
border: 1px solid $multiselect-border;
|
||||
background: $white;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.multiselect__tag {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
padding: 4px 26px 4px 10px;
|
||||
border-radius: 5px;
|
||||
margin-right: 10px;
|
||||
color: $white;
|
||||
line-height: 1;
|
||||
background: $multiselect-highlight;
|
||||
margin-bottom: 5px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
max-width: 100%;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.multiselect__tag-icon {
|
||||
cursor: pointer;
|
||||
margin-left: 7px;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
font-weight: 700;
|
||||
font-style: initial;
|
||||
width: 22px;
|
||||
text-align: center;
|
||||
line-height: 22px;
|
||||
transition: all 0.2s ease;
|
||||
border-radius: 5px;
|
||||
&:after {
|
||||
content: "×";
|
||||
color: darken($multiselect-highlight, 20);
|
||||
font-size: 14px;
|
||||
}
|
||||
&:focus, &:hover {
|
||||
background: lighten($multiselect-highlight, 10);
|
||||
}
|
||||
&:focus:after, &:hover:after {
|
||||
color: $white;
|
||||
}
|
||||
}
|
||||
|
||||
.multiselect__current {
|
||||
line-height: 16px;
|
||||
min-height: 40px;
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
padding: 8px 30px 0 12px;
|
||||
white-space: nowrap;
|
||||
margin: 0;
|
||||
text-decoration: none;
|
||||
border-radius: 5px;
|
||||
border: 1px solid $multiselect-border;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.multiselect__select {
|
||||
line-height: 16px;
|
||||
display: block;
|
||||
position: absolute;
|
||||
box-sizing: border-box;
|
||||
width: 40px;
|
||||
height: 38px;
|
||||
right: 1px;
|
||||
top: 1px;
|
||||
padding: 4px 8px;
|
||||
margin: 0;
|
||||
text-decoration: none;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
transition: transform 0.2s ease;
|
||||
&:before {
|
||||
position: relative;
|
||||
right: 0;
|
||||
top: 65%;
|
||||
color: darken($multiselect-border, 30);
|
||||
margin-top: 4px;
|
||||
border-style: solid;
|
||||
border-width: 5px 5px 0 5px;
|
||||
border-color: darken($multiselect-border, 30) transparent transparent transparent;
|
||||
content: "";
|
||||
}
|
||||
}
|
||||
|
||||
.multiselect__placeholder {
|
||||
color: darken($white, 15);
|
||||
display: inline-block;
|
||||
margin-bottom: 10px;
|
||||
padding-top: 2px;
|
||||
}
|
||||
|
||||
.multiselect--active .multiselect__placeholder {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.multiselect__content-wrapper {
|
||||
position: absolute;
|
||||
display: block;
|
||||
background: $white;
|
||||
width: 100%;
|
||||
max-height: 240px;
|
||||
overflow: auto;
|
||||
border: 1px solid $multiselect-border;
|
||||
border-top: none;
|
||||
border-bottom-left-radius: 5px;
|
||||
border-bottom-right-radius: 5px;
|
||||
z-index: 50;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.multiselect__content, .content ul.multiselect__content {
|
||||
list-style: none;
|
||||
display: inline-block;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
min-width: 100%;
|
||||
vertical-align: top;
|
||||
|
||||
li + li {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.multiselect--above .multiselect__content-wrapper {
|
||||
bottom: 100%;
|
||||
border-radius: 5px 5px 0 0;
|
||||
border-bottom: none;
|
||||
border-top: 1px solid $multiselect-border;
|
||||
}
|
||||
|
||||
.multiselect__content::webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.multiselect__element {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.multiselect__option {
|
||||
display: block;
|
||||
padding: 12px;
|
||||
min-height: 40px;
|
||||
line-height: 16px;
|
||||
text-decoration: none;
|
||||
text-transform: none;
|
||||
vertical-align: middle;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
&:after {
|
||||
top: 0;
|
||||
right: 0;
|
||||
position: absolute;
|
||||
line-height: 40px;
|
||||
padding-right: 12px;
|
||||
padding-left: 20px;
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
|
||||
.multiselect__option--highlight {
|
||||
background: $multiselect-highlight;
|
||||
outline: none;
|
||||
color: $white;
|
||||
&:after {
|
||||
content: attr(data-select);
|
||||
background: $multiselect-highlight;
|
||||
color: $white;
|
||||
}
|
||||
}
|
||||
|
||||
.multiselect__option--selected {
|
||||
background: darken($white, 10);
|
||||
color: $multiselect-dark;
|
||||
font-weight: bold;
|
||||
&:after {
|
||||
content: attr(data-selected);
|
||||
color: silver;
|
||||
}
|
||||
&.multiselect__option--highlight {
|
||||
background: $multiselect-highlight-negative;
|
||||
color: $white;
|
||||
&:after {
|
||||
background: $multiselect-highlight-negative;
|
||||
content: attr(data-deselect);
|
||||
color: $white;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.multiselect--disabled {
|
||||
background: $multiselect-disabled;
|
||||
pointer-events: none;
|
||||
.multiselect__current, .multiselect__select {
|
||||
background: $multiselect-disabled;
|
||||
color: darken($multiselect-disabled, 40);
|
||||
}
|
||||
}
|
||||
|
||||
.multiselect__option--disabled {
|
||||
background: $multiselect-disabled !important;
|
||||
color: darken($multiselect-disabled, 40) !important;
|
||||
cursor: text;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.multiselect__option--group {
|
||||
background: $multiselect-disabled;
|
||||
color: $multiselect-dark;
|
||||
&.multiselect__option--highlight {
|
||||
background: $multiselect-dark;
|
||||
color: $white;
|
||||
&:after {
|
||||
background: $multiselect-dark;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.multiselect__option--disabled.multiselect__option--highlight {
|
||||
background: $multiselect-disabled;
|
||||
}
|
||||
|
||||
.multiselect__option--group-selected.multiselect__option--highlight {
|
||||
background: $multiselect-highlight-negative;
|
||||
color: $white;
|
||||
&:after {
|
||||
background: $multiselect-highlight-negative;
|
||||
content: attr(data-deselect);
|
||||
color: $white;
|
||||
}
|
||||
}
|
||||
|
||||
.multiselect-enter-active, .multiselect-leave-active {
|
||||
transition: all 0.15s ease;
|
||||
}
|
||||
|
||||
.multiselect-enter, .multiselect-leave-active {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.multiselect__strong {
|
||||
margin-bottom: 8px;
|
||||
line-height: 20px;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
*[dir="rtl"] {
|
||||
.multiselect {
|
||||
text-align: right;
|
||||
}
|
||||
.multiselect__select {
|
||||
right: auto;
|
||||
left: 1px;
|
||||
}
|
||||
.multiselect__tags {
|
||||
padding: 8px 8px 0px 40px;
|
||||
}
|
||||
.multiselect__content {
|
||||
text-align: right;
|
||||
}
|
||||
.multiselect__option:after {
|
||||
right: auto;
|
||||
left: 0;
|
||||
}
|
||||
.multiselect__clear {
|
||||
right: auto;
|
||||
left: 12px;
|
||||
}
|
||||
.multiselect__spinner {
|
||||
right: auto;
|
||||
left: 1px;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes spinning {
|
||||
from {
|
||||
transform: rotate(0);
|
||||
}
|
||||
|
||||
to {
|
||||
transform: rotate(2turn);
|
||||
}
|
||||
}
|
||||
|
||||
.multiselect__tags {
|
||||
.remove-assignee {
|
||||
vertical-align: bottom;
|
||||
color: $red;
|
||||
margin-left: -1.8em;
|
||||
background: $white;
|
||||
padding: 0 4px;
|
||||
display: inline-block;
|
||||
border-radius: 100%;
|
||||
font-size: .8em;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
}
|
31
src/styles/components/base/scrollbars.scss
Normal file
31
src/styles/components/base/scrollbars.scss
Normal file
@ -0,0 +1,31 @@
|
||||
|
||||
// Chrome
|
||||
::-webkit-scrollbar {
|
||||
width: $scrollbar-height;
|
||||
height: $scrollbar-height;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
background: $scrollbar-track-color;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
border-radius: 10px;
|
||||
background: $scrollbar-thumb-color;
|
||||
-webkit-transition: background-color $transition;
|
||||
-moz-transition: background-color $transition;
|
||||
-ms-transition: background-color $transition;
|
||||
-o-transition: background-color $transition;
|
||||
transition: background-color $transition;
|
||||
|
||||
&:hover {
|
||||
background: $scrollbar-hover-color;
|
||||
}
|
||||
}
|
||||
|
||||
// Firefox
|
||||
*{
|
||||
scrollbar-color: $scrollbar-thumb-color $scrollbar-track-color;
|
||||
scrollbar-width: thin;
|
||||
}
|
109
src/styles/components/base/tooltip.scss
Normal file
109
src/styles/components/base/tooltip.scss
Normal file
@ -0,0 +1,109 @@
|
||||
.tooltip {
|
||||
display: block !important;
|
||||
z-index: 10000;
|
||||
font-size: 0.8em;
|
||||
text-align: center;
|
||||
|
||||
.tooltip-inner {
|
||||
background: $dark;
|
||||
color: white;
|
||||
border-radius: 5px;
|
||||
padding: 5px 10px 5px;
|
||||
}
|
||||
|
||||
.tooltip-arrow {
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-style: solid;
|
||||
position: absolute;
|
||||
margin: 5px;
|
||||
border-color: $dark;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
&[x-placement^="top"] {
|
||||
margin-bottom: 5px;
|
||||
|
||||
.tooltip-arrow {
|
||||
border-width: 5px 5px 0 5px;
|
||||
border-left-color: transparent !important;
|
||||
border-right-color: transparent !important;
|
||||
border-bottom-color: transparent !important;
|
||||
bottom: -5px;
|
||||
left: calc(50% - 5px);
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&[x-placement^="bottom"] {
|
||||
margin-top: 5px;
|
||||
|
||||
.tooltip-arrow {
|
||||
border-width: 0 5px 5px 5px;
|
||||
border-left-color: transparent !important;
|
||||
border-right-color: transparent !important;
|
||||
border-top-color: transparent !important;
|
||||
top: -5px;
|
||||
left: calc(50% - 5px);
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&[x-placement^="right"] {
|
||||
margin-left: 5px;
|
||||
|
||||
.tooltip-arrow {
|
||||
border-width: 5px 5px 5px 0;
|
||||
border-left-color: transparent !important;
|
||||
border-top-color: transparent !important;
|
||||
border-bottom-color: transparent !important;
|
||||
left: -5px;
|
||||
top: calc(50% - 5px);
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&[x-placement^="left"] {
|
||||
margin-right: 5px;
|
||||
|
||||
.tooltip-arrow {
|
||||
border-width: 5px 0 5px 5px;
|
||||
border-top-color: transparent !important;
|
||||
border-right-color: transparent !important;
|
||||
border-bottom-color: transparent !important;
|
||||
right: -5px;
|
||||
top: calc(50% - 5px);
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&.popover {
|
||||
.popover-inner {
|
||||
background: $light;
|
||||
color: $dark;
|
||||
padding: 24px;
|
||||
border-radius: 5px;
|
||||
box-shadow: 0 5px 30px rgba(black, .1);
|
||||
}
|
||||
|
||||
.popover-arrow {
|
||||
border-color: $light;
|
||||
}
|
||||
}
|
||||
|
||||
&[aria-hidden='true'] {
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
transition: opacity .15s, visibility .15s;
|
||||
}
|
||||
|
||||
&[aria-hidden='false'] {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
transition: opacity .15s;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user