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

164 lines
2.7 KiB
SCSS
Raw Normal View History

/**
* 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-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 {
background-color: $black;
}
}
.__button-black {
@extend .__button-base;
@extend .__button-padding-vertical;
@extend .__button-padding-horizontal;
&:not(:hover) {
background-color: $black;
border-color: $white;
box-shadow: 2px 2px 0 $white;
color: $white;
}
&:hover {
background-color: $white;
border-color: $black;
box-shadow: 2px 2px 0 $black;
color: inherit;
}
}
.__button-white {
@extend .__button-base;
@extend .__button-padding-vertical;
@extend .__button-padding-horizontal;
&:not(:hover) {
background-color: $white;
border-color: transparent;
box-shadow: 2px 2px 0 $black;
color: inherit;
}
&:hover {
background-color: $black;
border-color: $white;
box-shadow: 2px 2px 0 $white;
color: $white;
}
}
.__button-gray {
@extend .__button-base;
@extend .__button-padding-vertical;
@extend .__button-padding-horizontal;
background-color: $white;
&:not(:hover) {
border-color: transparent;
box-shadow: 2px 2px 0 $black;
}
&:hover {
border-color: $teal;
box-shadow: 2px 2px 0 $teal;
color: $teal;
}
}
.__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
}
/**
* Loader
*
* @class .__loading
* @selector {::before}
* @selector {::after}
*/
.__loading {
width: 100%; height: 10rem;
position: relative;
&::before {
width: 4rem; height: 4rem;
top: 2rem; left: calc(50% - 2rem);
animation: spin 2s linear infinite;
border-radius: 50%;
border-style: solid;
border-top-color: $teal;
border-width: 6px;
content: "";
position: absolute;
}
&::after {
top: 7rem; left: 0;
font-size: 1rem;
position: absolute;
text-align: center;
width: 100%;
}
}