lbry.tech/app/sass/init/_extends.scss

203 lines
3.5 KiB
SCSS
Raw Permalink Normal View History

2018-10-06 00:46:08 +02:00
/*!
* 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
2018-10-06 00:46:08 +02:00
**/
2018-05-02 00:45:31 +02:00
.__button-base {
border: 1px solid;
font-size: 1rem;
letter-spacing: 0.025rem;
position: relative;
transition: all 0.2s;
}
.__button-basic {
@extend .__button-base;
}
2018-05-02 00:45:31 +02:00
.__button-plain {
@extend .__button-base;
2018-05-02 00:45:31 +02:00
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 {
2018-10-13 00:29:53 +02:00
background-color: $lbry-black;
2018-05-02 00:45:31 +02:00
}
}
.__button-black {
@extend .__button-base;
@extend .__button-padding-vertical;
@extend .__button-padding-horizontal;
&:not(:hover) {
2018-10-13 00:29:53 +02:00
background-color: $lbry-black;
border-color: $lbry-white;
box-shadow: 2px 2px 0 $lbry-white;
color: $lbry-white;
2018-05-02 00:45:31 +02:00
}
&:hover {
2018-10-13 00:29:53 +02:00
background-color: $lbry-white;
border-color: $lbry-black;
box-shadow: 2px 2px 0 $lbry-black;
2018-05-02 00:45:31 +02:00
color: inherit;
}
}
.__button-white {
@extend .__button-base;
@extend .__button-padding-vertical;
@extend .__button-padding-horizontal;
&:not(:hover) {
2018-10-13 00:29:53 +02:00
background-color: $lbry-white;
2018-05-02 00:45:31 +02:00
border-color: transparent;
2018-10-13 00:29:53 +02:00
box-shadow: 2px 2px 0 $lbry-black;
2018-05-02 00:45:31 +02:00
color: inherit;
}
&:hover {
2018-10-13 00:29:53 +02:00
background-color: $lbry-black;
border-color: $lbry-white;
box-shadow: 2px 2px 0 $lbry-white;
color: $lbry-white;
2018-05-02 00:45:31 +02:00
}
}
.__button-gray {
@extend .__button-base;
@extend .__button-padding-vertical;
@extend .__button-padding-horizontal;
2018-10-13 00:29:53 +02:00
background-color: $lbry-white;
2018-05-02 00:45:31 +02:00
&:not(:hover) {
border-color: transparent;
2018-10-13 00:29:53 +02:00
box-shadow: 2px 2px 0 $lbry-black;
2018-05-02 00:45:31 +02:00
}
&:hover {
2018-10-13 00:29:53 +02:00
border-color: $lbry-teal-3;
box-shadow: 2px 2px 0 $lbry-teal-3;
color: $lbry-teal-3;
2018-05-02 00:45:31 +02:00
}
}
.__button-padding-horizontal {
padding-right: 1rem;
padding-left: 1rem;
}
.__button-padding-vertical {
padding-top: 0.5rem;
padding-bottom: 0.5rem;
2018-05-02 00:45:31 +02:00
}
.button {
@extend .__button-padding-horizontal;
2018-10-13 00:29:53 +02:00
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) {
2018-10-13 00:29:53 +02:00
background-color: $lbry-black;
&::after {
2018-10-13 00:29:53 +02:00
background-color: $lbry-black;
}
}
&:hover {
2018-10-13 00:29:53 +02:00
background-color: $lbry-teal-3;
&::after {
2018-10-13 00:29:53 +02:00
background-color: $lbry-teal-3;
}
}
}
2018-10-06 00:46:08 +02:00
/*!
* Loader
*
* @class .__loading
* @selector {::before}
* @selector {::after}
2018-10-06 00:46:08 +02:00
**/
.__loading {
width: 100%; height: 10rem;
2018-09-27 18:11:26 +02:00
cursor: wait;
position: relative;
&::before {
width: 4rem; height: 4rem;
top: 2rem; left: calc(50% - 2rem);
animation: spin 2s linear infinite;
2018-10-13 00:29:53 +02:00
border-top-color: $lbry-teal-3;
border-radius: 50%;
border-style: solid;
border-width: 6px;
content: "";
2018-09-27 18:11:26 +02:00
cursor: wait;
position: absolute;
}
&::after {
2018-10-06 00:46:08 +02:00
width: 100%;
top: 7rem; left: 0;
2018-09-27 18:11:26 +02:00
cursor: wait;
font-size: 1rem;
position: absolute;
text-align: center;
}
}