Refactor alert shortcode (#858)
Signed-off-by: hossainemruz <hossainemruz@gmail.com>
This commit is contained in:
parent
d3968ca711
commit
fdfee4d3bb
4 changed files with 93 additions and 2 deletions
|
@ -50,3 +50,23 @@
|
|||
color: get-dark-color('text-over-accent-color');
|
||||
}
|
||||
}
|
||||
|
||||
@function get-alert-bg-color($type, $mode) {
|
||||
$colors: map-get($alerts, $type);
|
||||
@if $mode == 'light' {
|
||||
@return map-get($colors, 'bg-color');
|
||||
} @else {
|
||||
@return map-get($colors, 'text-color');
|
||||
}
|
||||
@return red;
|
||||
}
|
||||
|
||||
@function get-alert-text-color($type, $mode) {
|
||||
$colors: map-get($alerts, $type);
|
||||
@if $mode == 'light' {
|
||||
@return map-get($colors, 'text-color');
|
||||
} @else {
|
||||
@return map-get($colors, 'bg-color');
|
||||
}
|
||||
@return red;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue