scinote-web/app/assets/stylesheets/shared_styles/elements/buttons.scss

171 lines
2.8 KiB
SCSS
Raw Normal View History

2019-12-04 22:17:59 +08:00
// scss-lint:disable NestingDepth
2020-01-07 23:13:34 +08:00
.btn{
2019-12-01 03:04:28 +08:00
@include font-button;
animation-timing-function: $timing-function-sharp;
border-radius: $border-radius-default;
cursor: pointer;
display: inline-block;
line-height: 20px;
outline: 0;
padding: 7px 16px;
2019-12-01 04:24:50 +08:00
position: relative;
text-align: center;
text-decoration: none;
2019-12-04 22:17:59 +08:00
transition: .3s;
2019-12-01 03:04:28 +08:00
user-select: none;
.fas {
color: inherit;
2019-12-04 22:17:59 +08:00
margin-right: 5px;
2019-12-01 03:04:28 +08:00
}
&:hover {
text-decoration: none;
2019-12-01 03:04:28 +08:00
}
&:active {
text-decoration: none;
}
&:focus {
outline: 0;
text-decoration: none;
2019-12-01 03:04:28 +08:00
}
2020-01-07 23:13:34 +08:00
&.btn-primary {
background: $brand-primary;
border: 1px solid $brand-primary;
color: $color-white;
&:hover {
background: $brand-primary-hover;
color: $color-white;
}
&:active {
background: $brand-primary-press;
color: $color-white;
}
&:focus {
box-shadow: 0 0 0 1px $brand-focus;
color: $color-white;
}
}
&.btn-secondary {
2019-12-01 03:04:28 +08:00
background: $color-white;
border: $border-default;
color: $color-black;
&:hover {
background: $color-concrete;
border: $border-secondary;
color: $color-black;
2019-12-01 03:04:28 +08:00
}
&:active {
background: $color-alto;
border: $border-secondary;
color: $color-black;
}
&:focus {
box-shadow: 0 0 0 1px $brand-focus;
color: $color-black;
2019-12-01 03:04:28 +08:00
}
}
2020-01-07 23:13:34 +08:00
&.btn-light {
2019-12-01 03:04:28 +08:00
background: transparent;
border: $border-transparent;
color: $color-black;
&:hover {
background: $color-concrete;
border: $border-transparent;
color: $color-black;
2019-12-01 03:04:28 +08:00
}
&:active {
background: $color-alto;
border: $border-transparent;
color: $color-black;
}
&:focus {
box-shadow: 0 0 0 1px $brand-focus;
color: $color-black;
2019-12-01 03:04:28 +08:00
}
}
2020-01-07 23:13:34 +08:00
&.btn-danger {
2019-12-01 03:04:28 +08:00
background: $brand-danger;
border: $border-danger;
2020-01-07 23:13:34 +08:00
color: $color-white;
2019-12-01 03:04:28 +08:00
&:hover {
background: $brand-danger-hover;
2020-01-07 23:13:34 +08:00
color: $color-white;
2019-12-01 03:04:28 +08:00
}
&:active {
background: $brand-danger-press;
2020-01-07 23:13:34 +08:00
color: $color-white;
2019-12-01 03:04:28 +08:00
}
&:focus {
box-shadow: 0 0 0 1px $brand-focus;
color: $color-white;
}
2019-12-01 03:04:28 +08:00
}
&.icon-btn {
padding: 7px;
width: 36px;
.fas {
margin: 0;
}
}
2019-12-01 04:24:50 +08:00
&:disabled {
background: $color-alto;
border: $border-tertiary;
color: $color-silver-chalice;
opacity: .5;
2019-12-01 04:24:50 +08:00
2020-01-07 23:13:34 +08:00
&.btn-secondary,
&.btn-light {
2019-12-01 04:24:50 +08:00
background: $color-white;
&:hover {
background: $color-white;
border: $border-tertiary;
color: $color-silver-chalice;
2019-12-01 04:24:50 +08:00
}
}
2020-01-07 23:13:34 +08:00
&.btn-danger {
2019-12-01 04:24:50 +08:00
&:hover {
background: $color-alto;
}
}
}
}
.sci-btn-group {
display: inline-block;
position: relative;
2020-01-07 23:13:34 +08:00
.btn {
2019-12-01 04:24:50 +08:00
float: left;
margin: 2px 4px 2px 0;
2019-12-01 04:24:50 +08:00
&:nth-last-child(1) {
2019-12-01 04:24:50 +08:00
margin-right: 0;
}
}
2019-12-04 22:17:59 +08:00
}