bitwarden-desktop/src/scss/buttons.scss

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

171 lines
2.9 KiB
SCSS
Raw Permalink Normal View History

2018-04-11 19:58:58 +02:00
@import "variables.scss";
2018-01-29 18:14:19 +01:00
2021-02-03 22:24:49 +01:00
.btn,
.vault .footer button,
.modal-footer button {
2018-01-29 18:14:19 +01:00
border-radius: $border-radius;
padding: 7px 15px;
2018-05-30 21:21:41 +02:00
border: 1px solid #000000;
2018-01-29 18:14:19 +01:00
font-size: $font-size-base;
2018-01-31 20:19:21 +01:00
white-space: nowrap;
text-align: center;
2018-02-01 03:13:42 +01:00
cursor: pointer;
2021-12-20 15:47:17 +01:00
2018-05-30 21:21:41 +02:00
@include themify($themes) {
background-color: themed("buttonBackgroundColor");
border-color: themed("buttonBorderColor");
color: themed("buttonColor");
2021-12-20 15:47:17 +01:00
}
2018-02-01 04:30:49 +01:00
&.primary {
2018-05-30 21:21:41 +02:00
@include themify($themes) {
color: themed("buttonPrimaryColor");
2021-12-20 15:47:17 +01:00
}
}
2018-02-01 04:30:49 +01:00
&.danger {
2018-05-30 21:21:41 +02:00
@include themify($themes) {
color: themed("buttonDangerColor");
2021-12-20 15:47:17 +01:00
}
}
2018-02-01 04:30:49 +01:00
&:hover:not([disabled]) {
2018-02-01 03:13:42 +01:00
cursor: pointer;
2018-01-29 18:14:19 +01:00
2018-05-30 21:21:41 +02:00
@include themify($themes) {
background-color: darken(themed("buttonBackgroundColor"), 1.5%);
border-color: darken(themed("buttonBorderColor"), 17%);
color: darken(themed("buttonColor"), 10%);
}
2018-02-01 04:30:49 +01:00
&.primary {
2018-05-30 21:21:41 +02:00
@include themify($themes) {
color: darken(themed("buttonPrimaryColor"), 6%);
}
2018-02-01 04:30:49 +01:00
}
&.danger {
2018-05-30 21:21:41 +02:00
@include themify($themes) {
color: darken(themed("buttonDangerColor"), 6%);
}
2018-01-29 18:14:19 +01:00
}
2021-12-20 15:47:17 +01:00
}
2018-01-29 18:14:19 +01:00
2018-01-31 05:34:45 +01:00
&:focus:not([disabled]) {
2018-02-01 04:30:49 +01:00
cursor: pointer;
2018-05-30 21:21:41 +02:00
@include themify($themes) {
background-color: darken(themed("buttonBackgroundColor"), 6%);
border-color: darken(themed("buttonBorderColor"), 25%);
2018-01-29 18:14:19 +01:00
}
2021-12-20 15:47:17 +01:00
}
2018-01-29 18:14:19 +01:00
2018-01-31 05:34:45 +01:00
&[disabled] {
2018-01-31 18:52:12 +01:00
opacity: 0.65;
2018-04-11 19:58:58 +02:00
cursor: default !important;
2018-01-31 05:34:45 +01:00
}
2018-01-29 18:14:19 +01:00
&.block {
display: block;
width: 100%;
}
2018-01-31 23:58:06 +01:00
&.link {
border: none !important;
background: none !important;
2018-04-10 06:05:20 +02:00
&:focus {
text-decoration: underline;
2018-01-31 23:58:06 +01:00
}
2021-12-20 15:47:17 +01:00
}
2018-01-29 18:14:19 +01:00
}
.action-buttons {
.btn {
&:focus {
outline: auto;
}
2021-12-20 15:47:17 +01:00
}
}
.btn-submit {
position: relative;
overflow: hidden;
2021-12-20 15:47:17 +01:00
.bwi-spinner {
position: absolute;
display: none;
align-items: center;
justify-content: center;
bottom: 0;
2021-12-20 15:47:17 +01:00
top: 0;
left: 0;
right: 0;
2021-12-20 15:47:17 +01:00
}
&:disabled:not(.manual),
&.loading {
.bwi-spinner {
display: flex;
}
span {
visibility: hidden;
}
2021-12-20 15:47:17 +01:00
}
}
.icon-btn {
cursor: pointer;
padding: 10px 8px;
background: none;
border: none;
@include themify($themes) {
color: themed("boxRowButtonColor");
}
&.primary {
@include themify($themes) {
color: themed("buttonPrimaryColor");
}
}
&.danger {
@include themify($themes) {
color: themed("buttonDangerColor");
}
}
&:hover,
&:focus {
@include themify($themes) {
color: themed("boxRowButtonHoverColor");
}
&.primary {
@include themify($themes) {
color: darken(themed("buttonPrimaryColor"), 6%);
}
}
&.danger {
@include themify($themes) {
color: darken(themed("buttonDangerColor"), 6%);
}
}
}
&.disabled {
@include themify($themes) {
color: themed("disabledIconColor");
}
&:hover {
@include themify($themes) {
color: themed("disabledIconColor");
}
}
}
}