Skip to content

Commit

Permalink
Polyfill for light-dark()
Browse files Browse the repository at this point in the history
  • Loading branch information
distantnative committed Nov 29, 2024
1 parent 0945cb8 commit 1f288b0
Show file tree
Hide file tree
Showing 3 changed files with 136 additions and 0 deletions.
129 changes: 129 additions & 0 deletions panel/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions panel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"vue": "^2.7.16"
},
"devDependencies": {
"@csstools/postcss-light-dark-function": "^2.0.7",
"@vitejs/plugin-vue2": "^2.3.1",
"eslint": "^9.15.0",
"eslint-config-prettier": "^9.1.0",
Expand Down
6 changes: 6 additions & 0 deletions panel/vite.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import vue from "@vitejs/plugin-vue2";
import { viteStaticCopy } from "vite-plugin-static-copy";
import externalize from "rollup-plugin-external-globals";
import kirby from "./scripts/vite-kirby.mjs";
import postcssLightDarkFunction from "@csstools/postcss-light-dark-function";

/**
* Returns all aliases used in the project
Expand Down Expand Up @@ -122,6 +123,11 @@ export default defineConfig(({ mode }) => {
}
}
},
css: {
postcss: {
plugins: [postcssLightDarkFunction()]
}
},
optimizeDeps: {
entries: "src/**/*.{js,vue}",
exclude: ["vitest", "vue"],
Expand Down

0 comments on commit 1f288b0

Please sign in to comment.