scinote-web/app/assets/stylesheets/shared_styles/elements/buttons.scss
2020-11-02 18:47:08 +01:00

182 lines
3 KiB
SCSS

// scss-lint:disable NestingDepth
.btn{
@include font-button;
animation-timing-function: $timing-function-sharp;
border-radius: $border-radius-default;
cursor: pointer;
display: inline-block;
height: 36px;
line-height: 20px;
outline: 0;
padding: 7px 16px;
position: relative;
text-align: center;
text-decoration: none;
transition: .3s;
user-select: none;
.fas,
img {
color: inherit;
margin-right: .25em;
}
&:hover {
text-decoration: none;
}
&:active,
&.active {
box-shadow: none;
text-decoration: none;
}
&:focus {
outline: 0;
text-decoration: none;
}
&.btn-primary {
background: $brand-primary;
border: 1px solid $brand-primary;
color: $color-white;
&:hover {
background: $brand-primary-hover;
color: $color-white;
}
&:active,
&.active {
background: $brand-primary-press;
color: $color-white;
}
&:focus {
box-shadow: 0 0 0 1px $brand-focus;
color: $color-white;
}
}
&.btn-secondary {
background: $color-white;
border: $border-default;
color: $color-volcano;
&:hover {
background: $color-concrete;
border: $border-secondary;
color: $color-volcano;
}
&:active,
&.active {
background: $color-alto;
border: $border-secondary;
color: $color-volcano;
}
&:focus {
box-shadow: 0 0 0 1px $brand-focus;
color: $color-volcano;
}
}
&.btn-light {
background: transparent;
border: $border-transparent;
color: $color-volcano;
&:hover {
background: $color-concrete;
border: $border-transparent;
color: $color-volcano;
}
&:active,
&.active {
background: $color-alto;
border: $border-transparent;
color: $color-volcano;
}
&:focus {
box-shadow: 0 0 0 1px $brand-focus;
color: $color-volcano;
}
}
&.btn-danger {
background: $brand-danger;
border: $border-danger;
color: $color-white;
&:hover {
background: $brand-danger-hover;
color: $color-white;
}
&:active,
&.active {
background: $brand-danger-press;
color: $color-white;
}
&:focus {
box-shadow: 0 0 0 1px $brand-focus;
color: $color-white;
}
}
&.icon-btn {
padding: 7px;
width: 36px;
.fas {
margin: 0;
}
}
&.disabled,
&:disabled {
color: $color-silver-chalice;
cursor: auto;
opacity: .5;
&.btn-primary,
&.btn-danger {
background: $color-alto;
border: $border-tertiary;
&:hover {
border: $border-tertiary;
color: $color-silver-chalice;
}
}
&.btn-secondary,
&.btn-light {
background: $color-white;
&:hover {
color: $color-silver-chalice;
}
}
}
}
.sci-btn-group {
display: inline-block;
position: relative;
.btn {
float: left;
margin: 2px 4px 2px 0;
&:nth-last-child(1) {
margin-right: 0;
}
}
}