bitwarden-desktop/src/scss/plugins.scss

189 lines
4.3 KiB
SCSS

$fa-font-path: "~font-awesome/fonts";
@import "~font-awesome/scss/font-awesome.scss";
@import "~angular2-toaster/toaster";
@import "~sweetalert2/src/sweetalert2.scss";
@import "variables.scss";
#toast-container {
.toast-close-button {
right: -0.15em;
}
.toast {
opacity: 1 !important;
background-image: none !important;
border-radius: $border-radius;
box-shadow: 0 0 8px rgba(0, 0, 0, 0.35);
display: flex;
align-items: center;
&:hover {
box-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
}
&:before {
font-family: FontAwesome;
font-size: 25px;
line-height: 20px;
float: left;
color: #ffffff;
padding-right: 10px;
margin: auto 0 auto -36px;
}
.toaster-icon {
display: none;
}
.toast-message {
p {
margin-bottom: 0.5rem;
&:last-child {
margin-bottom: 0;
}
}
}
&.toast-danger, &.toast-error {
background-image: none !important;
@include themify($themes) {
background-color: themed('dangerColor');
}
&:before {
content: "\f0e7";
margin-left: -30px;
}
}
&.toast-warning {
background-image: none !important;
@include themify($themes) {
background-color: themed('warningColor');
}
&:before {
content: "\f071";
}
}
&.toast-info {
background-image: none !important;
@include themify($themes) {
background-color: themed('infoColor');
}
&:before {
content: "\f05a";
}
}
&.toast-success {
background-image: none !important;
@include themify($themes) {
background-color: themed('successColor');
}
&:before {
content: "\f00C";
}
}
}
}
// SweetAlert2
.swal2-popup {
border-radius: $border-radius;
padding: 0;
width: 34em;
@include themify($themes) {
background-color: themed('backgroundColorAlt');
color: themed('textColor');
}
.swal2-content {
padding: 20px 20px 15px;
font-size: $font-size-base;
color: inherit;
label.checkbox {
margin-top: 10px;
display: flex;
text-align: left;
align-items: top;
input {
margin: 3px 5px 0 1px;
}
}
.swal2-input, .swal2-textarea {
border: 1px solid #000000;
border-radius: $border-radius;
margin-bottom: 0;
// Inherit theme font-size
font-size: inherit;
// Sweetalert 1 did not have box-shadow
&:focus {
box-shadow: none;
}
@include themify($themes) {
border-color: themed('inputBorderColor');
color: themed('textColor');
background-color: themed('inputBackgroundColor');
}
&::-webkit-input-placeholder {
@include themify($themes) {
color: themed('inputPlaceholderColor');
}
}
}
}
.swal2-text {
text-align: left; // sweetalert1 behaviour
font-size: $font-size-base;
@include themify($themes) {
color: themed('textColor');
}
}
> .swal2-text:first-child {
margin-top: 20px;
}
.swal2-actions {
padding: 0 10px 10px 10px; // 0 due to padding to content being 15px
margin: 0;
justify-content: flex-end;
.swal2-styled {
@extend .btn;
&:focus {
box-shadow: none;
}
}
.swal2-confirm {
// Overwrite border-left and border-right-color
@include themify($themes) {
border-color: themed('buttonBorderColor') !important;
}
@extend .btn.primary;
}
}
}