BookStack/resources/sass/_buttons.scss

133 lines
2.3 KiB
SCSS
Raw Normal View History

button {
background-color: transparent;
border: 0;
font-size: 100%;
}
2015-07-12 15:01:42 -04:00
.button {
2015-07-12 15:01:42 -04:00
text-decoration: none;
font-size: 0.85rem;
2015-07-12 15:01:42 -04:00
line-height: 1.4em;
padding: $-xs*1.3 $-m;
margin-top: $-xs;
margin-bottom: $-xs;
2015-07-12 15:01:42 -04:00
display: inline-block;
font-weight: 400;
2015-07-12 15:01:42 -04:00
outline: 0;
border-radius: 2px;
2015-07-12 15:01:42 -04:00
cursor: pointer;
transition: background-color ease-in-out 120ms,
filter ease-in-out 120ms,
box-shadow ease-in-out 120ms;
box-shadow: none;
background-color: var(--color-primary);
color: #FFF;
fill: #FFF;
text-transform: uppercase;
border: 1px solid var(--color-primary);
vertical-align: top;
&:hover, &:focus, &:active {
background-color: var(--color-primary);
text-decoration: none;
color: #FFFFFF;
}
&:hover {
box-shadow: $bs-light;
filter: brightness(110%);
2015-07-12 15:01:42 -04:00
}
&:focus {
outline: 1px dotted currentColor;
outline-offset: -$-xs;
box-shadow: none;
filter: brightness(90%);
}
&:active {
outline: 0;
2015-08-08 15:05:30 -04:00
}
2015-07-12 15:01:42 -04:00
}
.button.outline {
background-color: transparent;
color: #666;
fill: currentColor;
border: 1px solid #CCC;
&:hover, &:focus, &:active {
border: 1px solid #CCC;
box-shadow: none;
background-color: #F2F2F2;
filter: none;
}
&:active {
border-color: #BBB;
background-color: #DDD;
color: #666;
box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.1);
}
}
.button + .button {
margin-left: $-s;
}
.button.small {
font-size: 0.75rem;
padding: $-xs*1.2 $-s;
}
.text-button {
cursor: pointer;
background-color: transparent;
padding: 0;
margin: 0;
border: none;
2017-08-19 10:33:22 -04:00
user-select: none;
font-size: 0.75rem;
line-height: 1.4em;
color: var(--color-primary);
fill: var(--color-primary);
&:active {
outline: 0;
}
2016-05-14 15:02:00 -04:00
&:hover {
text-decoration: none;
}
&:hover, &:focus {
color: var(--color-primary);
fill: var(--color-primary);
}
2015-07-12 15:01:42 -04:00
}
2015-08-05 15:59:39 -04:00
.button.block {
width: 100%;
text-align: left;
2015-08-05 15:59:39 -04:00
display: block;
}
.button.icon {
.svg-icon {
margin-right: 0;
}
}
.button.svg {
svg {
display: inline-block;
position: absolute;
left: $-m;
top: $-s - 2px;
width: 24px;
height: 24px;
}
padding: $-s $-m ($-s - 2px) ($-m*2 + 24px);
}
.button[disabled] {
background-color: #BBB;
cursor: default;
border-color: #CCC;
&:hover {
background-color: #BBB;
cursor: default;
box-shadow: none;
}
}