UNPKG

@nextcloud/vue

Version:
13 lines (12 loc) 484 B
"use strict"; Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); function checkIfDarkTheme(el = document.body) { const backgroundInvertIfDark = window.getComputedStyle(el).getPropertyValue("--background-invert-if-dark"); if (backgroundInvertIfDark !== void 0) { return backgroundInvertIfDark === "invert(100%)"; } return false; } const isDarkTheme = checkIfDarkTheme(); exports.checkIfDarkTheme = checkIfDarkTheme; exports.isDarkTheme = isDarkTheme;