257 lines
3.8 KiB
SCSS
257 lines
3.8 KiB
SCSS
|
|
|
|
button
|
|
{
|
|
@extend %font;
|
|
color: var(--color-fg);
|
|
outline: 0 solid transparent !important;
|
|
display: inline-block;
|
|
|
|
&:visited, &:link
|
|
{
|
|
text-decoration: none;
|
|
}
|
|
|
|
&:focus, &:active
|
|
{
|
|
outline: 0 solid transparent !important;
|
|
}
|
|
}
|
|
|
|
button::-moz-focus-inner
|
|
{
|
|
border: 0;
|
|
}
|
|
|
|
.ui-button
|
|
{
|
|
position: relative;
|
|
display: inline-flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
color: var(--color-primary-fg);
|
|
background: var(--color-primary);
|
|
padding: 0 20px;
|
|
height: 42px;
|
|
border-radius: 3px;
|
|
font-size: 14px;
|
|
font-weight: 700;
|
|
margin: 0;
|
|
-webkit-backface-visibility: hidden;
|
|
-webkit-appearance: none;
|
|
cursor: pointer;
|
|
user-select: none;
|
|
border: none;
|
|
will-change: transform, background, border-color;
|
|
transition: background .2s, transform .2s, opacity .2s;
|
|
overflow: hidden;
|
|
outline: 0 solid transparent !important;
|
|
@extend %font;
|
|
|
|
&:hover
|
|
{
|
|
opacity: 0.9;
|
|
}
|
|
|
|
&:focus, &:active
|
|
{
|
|
outline: none !important;
|
|
}
|
|
|
|
&:active
|
|
{
|
|
opacity: 1;
|
|
}
|
|
|
|
&.is-disabled, &[disabled]
|
|
{
|
|
pointer-events: none;
|
|
//background: var(--color-dark);
|
|
}
|
|
|
|
&.type-outline
|
|
{
|
|
height: 43px;
|
|
background: var(--color-box);
|
|
color: var(--color-fg);
|
|
border: 1px solid var(--color-line);
|
|
box-sizing: border-box;
|
|
position: relative;
|
|
top: 1px;
|
|
}
|
|
|
|
&.type-big
|
|
{
|
|
height: 50px;
|
|
padding: 0 30px;
|
|
}
|
|
|
|
&.type-light
|
|
{
|
|
background: var(--color-bg-mid);
|
|
color: var(--color-fg);
|
|
border: none;
|
|
}
|
|
|
|
&.type-white
|
|
{
|
|
background: var(--color-box);
|
|
color: var(--color-fg);
|
|
border: none;
|
|
box-shadow: var(--color-shadow-short);
|
|
}
|
|
|
|
&.type-blank
|
|
{
|
|
background: transparent;
|
|
color: var(--color-fg);
|
|
border: none;
|
|
padding: 0 16px;
|
|
}
|
|
|
|
&.type-block
|
|
{
|
|
display: flex;
|
|
width: 100%;
|
|
}
|
|
|
|
& + .ui-button
|
|
{
|
|
margin-left: 15px;
|
|
}
|
|
|
|
.ui-button-icon, .ui-button-caret
|
|
{
|
|
margin-left: 18px;
|
|
margin-right: -3px;
|
|
position: relative;
|
|
font-size: var(--font-size-l);
|
|
top: -1px;
|
|
/*color: var(--color-fg-mid);*/
|
|
}
|
|
|
|
&.caret-left
|
|
{
|
|
flex-direction: row-reverse;
|
|
|
|
.ui-button-icon, .ui-button-caret
|
|
{
|
|
margin-right: 12px;
|
|
margin-left: -7px;
|
|
}
|
|
}
|
|
|
|
&.has-ellipsis .ui-button-text:after
|
|
{
|
|
content: '...';
|
|
}
|
|
}
|
|
|
|
.ui-button-state
|
|
{
|
|
position: absolute;
|
|
left: 50%;
|
|
top: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 16px;
|
|
height: 16px;
|
|
margin-left: -8px;
|
|
margin-top: -8px;
|
|
text-align: center;
|
|
}
|
|
|
|
.ui-button-progress
|
|
{
|
|
width: 100%;
|
|
height: 100%;
|
|
z-index: 2;
|
|
border-radius: 40px;
|
|
border: 2px solid var(--color-fg-mid);
|
|
border-left-color: var(--color-bg);
|
|
opacity: 1;
|
|
will-change: transform;
|
|
animation: rotating .5s linear infinite;
|
|
transition: opacity .25s ease;
|
|
|
|
.type-light &, .type-blank &
|
|
{
|
|
border-color: var(--color-bg-mid);
|
|
border-left-color: var(--color-fg);
|
|
}
|
|
}
|
|
|
|
@keyframes rotating
|
|
{
|
|
from
|
|
{
|
|
-webkit-transform: rotate(0);
|
|
transform: rotate(0)
|
|
}
|
|
to
|
|
{
|
|
-webkit-transform: rotate(1turn);
|
|
transform: rotate(1turn)
|
|
}
|
|
}
|
|
|
|
|
|
// states
|
|
|
|
.ui-button.has-state:not(.state-default)
|
|
{
|
|
> :not(.ui-button-state)
|
|
{
|
|
visibility: hidden;
|
|
}
|
|
}
|
|
|
|
|
|
.ui-dot-button
|
|
{
|
|
@extend .ui-button;
|
|
background: transparent;
|
|
padding: 0;
|
|
height: 28px;
|
|
width: 36px;
|
|
text-align: center;
|
|
justify-content: center;
|
|
font-size: var(--font-size-xl);
|
|
|
|
&:hover
|
|
{
|
|
background: var(--color-bg-mid);
|
|
}
|
|
|
|
.ui-button-icon
|
|
{
|
|
margin: 0;
|
|
}
|
|
}
|
|
|
|
|
|
.ui-icon-button
|
|
{
|
|
@extend .ui-button;
|
|
background: var(--color-bg-mid);
|
|
padding: 0;
|
|
height: 32px;
|
|
width: 32px;
|
|
border-radius: 16px;
|
|
text-align: center;
|
|
justify-content: center;
|
|
font-size: var(--font-size-l);
|
|
|
|
&:hover
|
|
{
|
|
opacity: 1;
|
|
}
|
|
|
|
.ui-button-icon
|
|
{
|
|
color: var(--color-fg);
|
|
margin: 0;
|
|
top: 0;
|
|
}
|
|
} |