bitwarden-desktop/src/scss/plugins.scss

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

204 lines
3.7 KiB
SCSS
Raw Normal View History

2021-12-07 20:42:31 +01:00
@import "~ngx-toastr/toastr";
@import "~sweetalert2/src/sweetalert2.scss";
2018-01-27 19:12:06 +01:00
@import "variables.scss";
2018-01-26 20:12:41 +01:00
2021-06-16 21:44:17 +02:00
.toast-container {
2018-01-26 20:12:41 +01:00
.toast-close-button {
2021-06-16 21:44:17 +02:00
font-size: 18px;
2021-12-07 20:42:31 +01:00
margin-right: 4px;
2021-12-20 15:47:17 +01:00
}
2021-12-07 20:42:31 +01:00
.ngx-toastr {
align-items: center;
2018-01-26 20:12:41 +01:00
background-image: none !important;
border-radius: $border-radius;
box-shadow: 0 0 8px rgba(0, 0, 0, 0.35);
display: flex;
2021-12-07 20:42:31 +01:00
padding: 15px;
2021-12-20 15:47:17 +01:00
2018-01-26 20:12:41 +01:00
.toast-close-button {
2021-06-16 21:44:17 +02:00
position: absolute;
2021-12-07 20:42:31 +01:00
right: 5px;
2021-12-20 15:47:17 +01:00
top: 0;
2018-01-26 20:12:41 +01:00
}
2021-12-07 20:42:31 +01:00
&:hover {
2018-01-26 20:12:41 +01:00
box-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
}
2021-12-07 20:42:31 +01:00
.icon i::before {
float: left;
font-style: normal;
font-family: $icomoon-font-family;
2018-01-26 20:12:41 +01:00
font-size: 25px;
line-height: 20px;
2021-12-07 20:42:31 +01:00
padding-right: 15px;
2018-01-26 20:12:41 +01:00
}
2018-08-02 14:48:48 +02:00
.toast-message {
p {
margin-bottom: 0.5rem;
&:last-child {
margin-bottom: 0;
}
2021-12-20 15:47:17 +01:00
}
}
2018-08-02 14:48:48 +02:00
2018-01-26 20:12:41 +01:00
&.toast-danger,
&.toast-error {
2018-05-30 21:21:41 +02:00
@include themify($themes) {
background-color: themed("dangerColor");
}
2018-01-26 20:12:41 +01:00
2021-12-07 20:42:31 +01:00
.icon i::before {
content: map_get($icons, "error");
2018-01-26 20:12:41 +01:00
}
}
&.toast-warning {
2018-05-30 21:21:41 +02:00
@include themify($themes) {
background-color: themed("warningColor");
}
2018-01-26 20:12:41 +01:00
2021-12-07 20:42:31 +01:00
.icon i::before {
content: map_get($icons, "exclamation-triangle");
2018-01-26 20:12:41 +01:00
}
}
&.toast-info {
2018-05-30 21:21:41 +02:00
@include themify($themes) {
background-color: themed("infoColor");
}
2018-01-26 20:12:41 +01:00
2021-12-07 20:42:31 +01:00
.icon i:before {
content: map_get($icons, "info-circle");
2018-01-26 20:12:41 +01:00
}
}
&.toast-success {
2018-05-30 21:21:41 +02:00
@include themify($themes) {
background-color: themed("successColor");
}
2018-01-26 20:12:41 +01:00
2021-12-07 20:42:31 +01:00
.icon i:before {
content: map_get($icons, "check");
2018-01-26 20:12:41 +01:00
}
}
2021-12-20 15:47:17 +01:00
}
2018-01-26 20:12:41 +01:00
}
2019-02-13 16:06:58 +01:00
// SweetAlert2
2019-02-13 16:06:58 +01:00
.swal2-popup {
2020-03-04 19:56:41 +01:00
padding: 15px;
2019-02-13 16:06:58 +01:00
border-radius: $border-radius;
width: 34em;
2021-12-20 15:47:17 +01:00
2019-02-13 16:06:58 +01:00
@include themify($themes) {
background-color: themed("backgroundColorAlt");
color: themed("textColor");
2021-12-20 15:47:17 +01:00
}
2020-03-04 19:56:41 +01:00
.swal2-icon {
margin: 0 auto;
width: auto;
height: auto;
border: none;
2021-12-20 15:47:17 +01:00
}
.swal2-content {
2020-03-04 19:56:41 +01:00
margin: 0;
2019-02-14 20:00:09 +01:00
font-size: $font-size-base;
2019-02-13 16:06:58 +01:00
@include themify($themes) {
color: themed("textColor");
}
2020-03-04 19:56:41 +01:00
label.checkbox {
2019-02-14 20:00:09 +01:00
margin-top: 10px;
display: flex;
2020-03-04 19:56:41 +01:00
text-align: left;
align-items: top;
2021-12-20 15:47:17 +01:00
2020-03-04 19:56:41 +01:00
input {
margin: 3px 5px 0 1px;
2021-12-20 15:47:17 +01:00
}
2020-03-04 19:56:41 +01:00
}
.swal2-input,
.swal2-textarea {
border: 1px solid #000000;
border-radius: $border-radius;
2020-03-04 19:56:41 +01:00
margin-bottom: 0;
2019-02-14 20:00:09 +01:00
box-shadow: none;
// Inherit theme font-size
font-size: inherit;
2021-12-20 15:47:17 +01:00
// Sweetalert 1 did not have box-shadow
&:focus {
box-shadow: none;
2021-12-20 15:47:17 +01:00
}
@include themify($themes) {
border-color: themed("inputBorderColor");
color: themed("textColor");
2019-02-14 20:00:09 +01:00
background-color: themed("inputBackgroundColor");
2021-12-20 15:47:17 +01:00
}
&::-webkit-input-placeholder {
2020-03-04 19:56:41 +01:00
@include themify($themes) {
color: themed("inputPlaceholderColor");
}
2021-12-20 15:47:17 +01:00
}
2019-02-14 20:00:09 +01:00
}
2021-12-20 15:47:17 +01:00
}
2019-02-14 20:00:09 +01:00
2020-03-04 19:56:41 +01:00
i.swal-custom-icon {
display: block;
margin: 0 auto;
font-size: 35px;
}
.swal2-title {
padding: 10px 0 15px;
margin: 0;
font-size: $font-size-large;
2021-12-20 15:47:17 +01:00
2020-03-04 19:56:41 +01:00
@include themify($themes) {
color: themed("textColor");
}
2021-12-20 15:47:17 +01:00
}
2020-03-04 19:56:41 +01:00
.swal2-text {
text-align: left; // sweetalert1 behaviour
2019-02-13 16:06:58 +01:00
font-size: $font-size-base;
@include themify($themes) {
color: themed("textColor");
}
2021-12-20 15:47:17 +01:00
}
2019-02-13 16:06:58 +01:00
> .swal2-text:first-child {
2019-02-13 16:06:58 +01:00
margin-top: 20px;
}
.swal2-actions {
2020-03-04 19:56:41 +01:00
margin: 20px auto 0;
2020-03-04 20:03:00 +01:00
justify-content: flex-start;
flex-direction: row-reverse;
2019-02-13 16:06:58 +01:00
2020-02-24 16:13:26 +01:00
button {
margin-left: 10px;
2019-02-13 16:06:58 +01:00
@extend .btn;
2020-02-24 16:13:26 +01:00
&.swal2-confirm {
@extend .btn, .primary;
2020-02-24 16:13:26 +01:00
font-weight: bold;
2019-02-13 16:06:58 +01:00
}
}
2021-12-20 15:47:17 +01:00
}
.swal2-validation-message {
margin-top: 20px;
}
2019-02-13 16:06:58 +01:00
}