lbry.tech/app/sass/init/_extends.scss
2018-10-12 17:29:53 -05:00

202 lines
3.5 KiB
SCSS

/*!
* Button
*
* @class .__button-base
* @class .__button-basic
*
* @class .__button-plain
* @selector {::after}
* @state {:hover}
*
* @class .__button-black
* @state {:hover}
*
* @class .__button-white
* @state {:hover}
*
* @class .__button-gray
* @state {:hover}
*
* @class .__button-padding-horizontal
* @class .__button-padding-vertical
**/
.__button-base {
border: 1px solid;
font-size: 1rem;
letter-spacing: 0.025rem;
position: relative;
transition: all 0.2s;
}
.__button-basic {
@extend .__button-base;
}
.__button-plain {
@extend .__button-base;
background-color: transparent;
border-color: transparent;
&::after {
width: 100%; height: 2px;
bottom: 2px; left: 0;
content: "";
display: block;
transition: background-color 0.2s;
}
&:not(:hover)::after {
background-color: transparent;
}
&:hover::after {
background-color: $lbry-black;
}
}
.__button-black {
@extend .__button-base;
@extend .__button-padding-vertical;
@extend .__button-padding-horizontal;
&:not(:hover) {
background-color: $lbry-black;
border-color: $lbry-white;
box-shadow: 2px 2px 0 $lbry-white;
color: $lbry-white;
}
&:hover {
background-color: $lbry-white;
border-color: $lbry-black;
box-shadow: 2px 2px 0 $lbry-black;
color: inherit;
}
}
.__button-white {
@extend .__button-base;
@extend .__button-padding-vertical;
@extend .__button-padding-horizontal;
&:not(:hover) {
background-color: $lbry-white;
border-color: transparent;
box-shadow: 2px 2px 0 $lbry-black;
color: inherit;
}
&:hover {
background-color: $lbry-black;
border-color: $lbry-white;
box-shadow: 2px 2px 0 $lbry-white;
color: $lbry-white;
}
}
.__button-gray {
@extend .__button-base;
@extend .__button-padding-vertical;
@extend .__button-padding-horizontal;
background-color: $lbry-white;
&:not(:hover) {
border-color: transparent;
box-shadow: 2px 2px 0 $lbry-black;
}
&:hover {
border-color: $lbry-teal-3;
box-shadow: 2px 2px 0 $lbry-teal-3;
color: $lbry-teal-3;
}
}
.__button-padding-horizontal {
padding-right: 1rem;
padding-left: 1rem;
}
.__button-padding-vertical {
padding-top: 0.5rem;
padding-bottom: 0.5rem;
}
.button {
@extend .__button-padding-horizontal;
color: $lbry-white;
font-size: 1rem;
line-height: 2rem;
position: relative;
transition: background-color 0.2s;
&::after {
width: calc(100% + 2px); height: calc(100% + 2px);
top: -1px; left: -1px;
content: "";
position: absolute;
transition: background-color 0.2s;
z-index: -1;
}
&:not(:hover) {
background-color: $lbry-black;
&::after {
background-color: $lbry-black;
}
}
&:hover {
background-color: $lbry-teal-3;
&::after {
background-color: $lbry-teal-3;
}
}
}
/*!
* Loader
*
* @class .__loading
* @selector {::before}
* @selector {::after}
**/
.__loading {
width: 100%; height: 10rem;
cursor: wait;
position: relative;
&::before {
width: 4rem; height: 4rem;
top: 2rem; left: calc(50% - 2rem);
animation: spin 2s linear infinite;
border-top-color: $lbry-teal-3;
border-radius: 50%;
border-style: solid;
border-width: 6px;
content: "";
cursor: wait;
position: absolute;
}
&::after {
width: 100%;
top: 7rem; left: 0;
cursor: wait;
font-size: 1rem;
position: absolute;
text-align: center;
}
}