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

153 lines
2.5 KiB
SCSS
Raw Normal View History

2019-12-01 03:04:28 +08:00
.sci-btn {
@include font-button;
animation-timing-function: $timing-function-sharp;
background: $brand-primary;
border: 1px solid $brand-primary;
border-radius: $border-radius-default;
color: $color-white;
cursor: pointer;
display: inline-block;
font-size: 14px;
line-height: 20px;
outline: 0;
padding: 7px 16px;
2019-12-01 04:24:50 +08:00
position: relative;
2019-12-01 03:04:28 +08:00
transition: .3s;
text-decoration: none;
2019-12-01 03:04:28 +08:00
user-select: none;
.fas {
color: inherit;
margin-right: 5px
}
&:hover {
background: $brand-primary-hover;
color: $color-white;
text-decoration: none;
2019-12-01 03:04:28 +08:00
}
&:active {
background: $brand-primary-press;
color: $color-white;
text-decoration: none;
}
&:focus {
border: $border-focus;
color: $color-white;
outline: 0;
text-decoration: none;
2019-12-01 03:04:28 +08:00
}
&.secondary {
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 {
border: $border-focus;
color: $color-black;
2019-12-01 03:04:28 +08:00
}
}
&.tertiary {
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 {
border: $border-focus;
color: $color-black;
2019-12-01 03:04:28 +08:00
}
}
&.sensitive {
background: $brand-danger;
border: $border-danger;
&:hover {
background: $brand-danger-hover;
}
&:active {
background: $brand-danger-press;
}
&:focus {
border: $border-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
&.secondary,
&.tertiary {
background: $color-white;
&:hover {
background: $color-white;
border: $border-tertiary;
color: $color-silver-chalice;
2019-12-01 04:24:50 +08:00
}
}
&.sensitive {
&:hover {
background: $color-alto;
}
}
}
}
.sci-btn-group {
display: inline-block;
position: relative;
.sci-btn {
float: left;
margin: 0 4px 4px 0;
&:nth-last-child(1) {
2019-12-01 04:24:50 +08:00
margin-right: 0;
}
}
2019-12-01 03:04:28 +08:00
}