Skip to content

Commit 950a75c

Browse files
committed
style: adjust alert colors
1 parent b8cf75d commit 950a75c

File tree

3 files changed

+25
-9
lines changed

3 files changed

+25
-9
lines changed

src/assets/scss/_variables.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77

88
@use 'sass:math';
99

10+
$dark-mode: false;
11+
12+
1013
// Mazer Variables
1114
@import "~bootstrap/scss/functions";
1215

src/assets/scss/components/_alert.scss

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@
3030
}
3131
@each $key, $value in $theme-colors-light {
3232
.alert-light-#{$key} {
33-
background-color: $value;
33+
@if($dark-mode == true) {
34+
background-color: lighten(saturate($value,30%),10%);
35+
color: saturate(shade-color($value, 60%), 40%);
36+
border: 1px solid tint-color($value, 10%);
37+
}
38+
@else {
39+
background-color: saturate($value,10%);
40+
color: saturate(shade-color($value, 60%), 40%);
41+
}
3442
}
3543
}

src/assets/scss/themes/dark/_variables-dark.scss

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
@use 'sass:color';
22

3+
$dark-mode: true;
4+
35
$theme-colors-light: (
4-
'primary': rgba($primary, .6),
5-
'secondary': rgba($secondary, .6),
6-
'success': rgba($success, .6),
7-
'danger': rgba($danger, .6),
8-
'warning': rgba($warning, .6),
9-
'info': rgba($info, .6),
6+
'primary': tint-color($primary, 25%),
7+
'secondary': tint-color($secondary, 25%),
8+
'success': tint-color($success, 25%),
9+
'danger': tint-color($danger, 35%),
10+
'warning': tint-color($warning, 25%),
11+
'info': tint-color($info, 25%),
1012
);
1113

1214
$alert-colors: (
@@ -20,7 +22,7 @@ $alert-colors: (
2022
),
2123
success: (
2224
text-color: #fff,
23-
background-color: #28ab55
25+
background-color: #198754
2426
),
2527
warning: (
2628
text-color: #3f3a26,
@@ -64,6 +66,7 @@ $page-error-bg: $body-bg;
6466

6567

6668
$link-color: $primary;
69+
$link-shade-percentage: -20%;
6770
$link-hover-color: shift-color($link-color, $link-shade-percentage);
6871

6972
$component-active-color: #9899ac;
@@ -133,8 +136,10 @@ $form-textarea-title-bg: lighten($input-bg,10%);
133136
$nav-link-disabled-color: $gray-600;
134137
$nav-tabs-border-color: $gray-300;
135138
$nav-tabs-link-hover-border-color: $gray-200 $gray-200 $nav-tabs-border-color;
139+
$nav-tabs-link-active-bg: rgba(44, 44, 58, 0.85);
136140
$nav-tabs-link-active-border-color: $gray-300 $gray-300 $nav-tabs-link-active-bg;
137141

142+
138143
$dropdown-color: #92929F;
139144
$dropdown-bg: #161b22;
140145
$dropdown-border-color: rgba($black, .15);
@@ -190,7 +195,7 @@ $toast-header-background-color: rgba($white, .85);
190195
$toast-header-border-color: rgba(0, 0, 0, .05);
191196

192197
$badge-color: $white;
193-
$border-color: $gray-400 !default;
198+
$border-color: $gray-600;
194199

195200
$modal-content-bg: $card-bg;
196201
$modal-content-border-color: rgba($black, .2);

0 commit comments

Comments
 (0)