mirror of https://github.com/getmango/Mango.git
Make uk-card adaptive to dark/light mode
This commit is contained in:
parent
1b25a1fa47
commit
c36d2608e8
|
@ -43,3 +43,22 @@
|
|||
@internal-list-bullet-image: "../img/list-bullet.svg";
|
||||
@internal-accordion-open-image: "../img/accordion-open.svg";
|
||||
@internal-accordion-close-image: "../img/accordion-close.svg";
|
||||
|
||||
.hook-card-default() {
|
||||
.uk-light & {
|
||||
background: @card-secondary-background;
|
||||
color: @card-secondary-color;
|
||||
}
|
||||
}
|
||||
|
||||
.hook-card-default-title() {
|
||||
.uk-light & {
|
||||
color: @card-secondary-title-color;
|
||||
}
|
||||
}
|
||||
|
||||
.hook-card-default-hover() {
|
||||
.uk-light & {
|
||||
background-color: @card-secondary-hover-background;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -117,14 +117,10 @@ const setTheme = (theme) => {
|
|||
if (theme === 'dark') {
|
||||
$('html').css('background', 'rgb(20, 20, 20)');
|
||||
$('body').addClass('uk-light');
|
||||
$('.uk-card').addClass('uk-card-secondary');
|
||||
$('.uk-card').removeClass('uk-card-default');
|
||||
$('.ui-widget-content').addClass('dark');
|
||||
} else {
|
||||
$('html').css('background', '');
|
||||
$('body').removeClass('uk-light');
|
||||
$('.uk-card').removeClass('uk-card-secondary');
|
||||
$('.uk-card').addClass('uk-card-default');
|
||||
$('.ui-widget-content').removeClass('dark');
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue