workaround for FireFox theme-controller CSS selector bug
fix: #2503 fix: #2525
This commit is contained in:
parent
e00b3d9814
commit
a6e16324e7
|
@ -3,7 +3,7 @@ const responsiveRegex = require("../lib/responsiveRegex")
|
|||
const utilityClasses = require("../lib/utility-classes")
|
||||
|
||||
module.exports = {
|
||||
content: [{ raw: "" }],
|
||||
content: [{ raw: '<input class="theme-controller" checked/>', extension: "html" }],
|
||||
safelist: responsiveRegex,
|
||||
theme: {
|
||||
colors: require("../theming"),
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
content: [{ raw: "" }],
|
||||
content: [{ raw: '<input class="theme-controller" checked/>', extension: "html" }],
|
||||
experimental: {
|
||||
optimizeUniversalDefaults: true,
|
||||
},
|
||||
|
|
|
@ -202,34 +202,19 @@ module.exports = {
|
|||
}
|
||||
}
|
||||
// theme 0 with name
|
||||
themesToInject["[data-theme=" + themeOrder[0] + "]"] = includedThemesObj[themeOrder[0]]
|
||||
themesToInject[
|
||||
"[data-theme=" +
|
||||
themeOrder[0] +
|
||||
"], " +
|
||||
themeRoot +
|
||||
":has(input.theme-controller[value=" +
|
||||
themeOrder[0] +
|
||||
"]:checked)"
|
||||
themeRoot + ":has(input.theme-controller[value=" + themeOrder[0] + "]:checked)"
|
||||
] = includedThemesObj[themeOrder[0]]
|
||||
// theme 1 with name
|
||||
themesToInject["[data-theme=" + themeOrder[1] + "]"] = includedThemesObj[themeOrder[1]]
|
||||
themesToInject[
|
||||
"[data-theme=" +
|
||||
themeOrder[1] +
|
||||
"], " +
|
||||
themeRoot +
|
||||
":has(input.theme-controller[value=" +
|
||||
themeOrder[1] +
|
||||
"]:checked)"
|
||||
themeRoot + ":has(input.theme-controller[value=" + themeOrder[1] + "]:checked)"
|
||||
] = includedThemesObj[themeOrder[1]]
|
||||
} else {
|
||||
themesToInject["[data-theme=" + themeName + "]"] = includedThemesObj[themeName]
|
||||
themesToInject[
|
||||
"[data-theme=" +
|
||||
themeName +
|
||||
"], " +
|
||||
themeRoot +
|
||||
":has(input.theme-controller[value=" +
|
||||
themeName +
|
||||
"]:checked)"
|
||||
themeRoot + ":has(input.theme-controller[value=" + themeName + "]:checked)"
|
||||
] = includedThemesObj[themeName]
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue