This commit is contained in:
Ondřej 2023-09-05 22:06:16 +02:00
parent 2c25b261d4
commit 90b9f67827
2 changed files with 17 additions and 14 deletions

16
view/helpers.ts Normal file
View file

@ -0,0 +1,16 @@
/**
* No-op tag function for CSS tagged templates, which works only as a hint for IDE for CSS syntax highlighting.
*/
export function css(
strings: TemplateStringsArray,
...exprs: Array<unknown>
): string {
let result = strings[0];
for (let i = 1, l = strings.length; i < l; i++) {
result += exprs[i - 1];
result += strings[i];
}
return result;
}

View file

@ -1,5 +1,6 @@
import { defineConfig } from "unocss";
import presetMini, { theme, Theme } from "@unocss/preset-mini";
import { css } from "./helpers";
const globalCss = (theme: Required<Theme>) => css`
/* This file is dynamically generated. Do not edit this file. */
@ -264,20 +265,6 @@ const globalCss = (theme: Required<Theme>) => css`
}
`;
/**
* No-op tag function for CSS tagged templates, which works only as a hint for IDE for CSS syntax highlighting.
*/
function css(strings: TemplateStringsArray, ...exprs: Array<unknown>): string {
let result = strings[0];
for (let i = 1, l = strings.length; i < l; i++) {
result += exprs[i - 1];
result += strings[i];
}
return result;
}
export default defineConfig({
presets: [presetMini()],
theme: {