Refactor alert shortcode (#858)

Signed-off-by: hossainemruz <hossainemruz@gmail.com>
This commit is contained in:
Emruz Hossain 2024-01-01 14:58:11 +06:00 committed by GitHub
parent d3968ca711
commit fdfee4d3bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 93 additions and 2 deletions

View file

@ -31,6 +31,24 @@ pre {
}
}
}
$alert-types: ('success', 'info', 'warning', 'danger');
.alert {
@each $type in $alert-types {
&.#{$type} {
background: get-alert-bg-color($type, 'light');
svg {
width: 1.25rem;
height: 1.25rem;
color: get-alert-text-color($type, 'light') !important;
}
strong {
padding-left: 0.5rem;
color: get-alert-text-color($type, 'light') !important;
}
}
}
}
html[data-theme='dark'] {
.paginator {
@ -45,4 +63,17 @@ html[data-theme='dark'] {
}
}
}
.alert {
@each $type in $alert-types {
&.#{$type} {
background: get-alert-bg-color($type, 'dark');
svg {
color: get-alert-text-color($type, 'dark') !important;
}
strong {
color: get-alert-text-color($type, 'dark') !important;
}
}
}
}
}