Переопределить z-индекс ⇐ CSS
-
Anonymous
Переопределить z-индекс
I am using darkmode.js https://darkmodejs.learn.uno/ library for darkmode. It uses css mix-blend-mode in order to bring Dark-mode. When I check manually it applies transform : scale(1) for dark mode.
function addDarkmodeWidget() { new Darkmode().showWidget(); } window.addEventListener('load', addDarkmodeWidget); It does not work well with components of bootstrap (esp. widgets), hence I used it as per doc .
.darkmode-layer, .darkmode-toggle { z-index: 500; } Now I want to ignore CSS for some of the widgets like button (with class .btn-primary) when in dark mode. I want to show actual color of button in dark mode. I tried darkmode-ignore , isolation: isolate, mix-blend-mode: difference; but it does not work.
Checkout jsfiddle link - https://jsfiddle.net/27b06hy9/ I want to show background color of button (with class .btn-primary) as blue in dark mode. Remaining buttons can be shown as it is in dark mode.
Источник: https://stackoverflow.com/questions/667 ... de-z-index
I am using darkmode.js https://darkmodejs.learn.uno/ library for darkmode. It uses css mix-blend-mode in order to bring Dark-mode. When I check manually it applies transform : scale(1) for dark mode.
function addDarkmodeWidget() { new Darkmode().showWidget(); } window.addEventListener('load', addDarkmodeWidget); It does not work well with components of bootstrap (esp. widgets), hence I used it as per doc .
.darkmode-layer, .darkmode-toggle { z-index: 500; } Now I want to ignore CSS for some of the widgets like button (with class .btn-primary) when in dark mode. I want to show actual color of button in dark mode. I tried darkmode-ignore , isolation: isolate, mix-blend-mode: difference; but it does not work.
Checkout jsfiddle link - https://jsfiddle.net/27b06hy9/ I want to show background color of button (with class .btn-primary) as blue in dark mode. Remaining buttons can be shown as it is in dark mode.
Источник: https://stackoverflow.com/questions/667 ... de-z-index
Мобильная версия