diff --git a/view/helpers.ts b/view/helpers.ts new file mode 100644 index 0000000..7ee57ba --- /dev/null +++ b/view/helpers.ts @@ -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 +): string { + let result = strings[0]; + + for (let i = 1, l = strings.length; i < l; i++) { + result += exprs[i - 1]; + result += strings[i]; + } + + return result; +} diff --git a/view/uno.config.ts b/view/uno.config.ts index 7b471c9..ac59246 100644 --- a/view/uno.config.ts +++ b/view/uno.config.ts @@ -1,5 +1,6 @@ import { defineConfig } from "unocss"; import presetMini, { theme, Theme } from "@unocss/preset-mini"; +import { css } from "./helpers"; const globalCss = (theme: Required) => css` /* This file is dynamically generated. Do not edit this file. */ @@ -264,20 +265,6 @@ const globalCss = (theme: Required) => 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): 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: {