shared-integration
v0.0.12
Published
Unocss Internal package for common logics of bundler integrations.
Downloads
5
Readme
@unocss/shared-integration
Internal package for common logics of bundler integrations.
https://github.com/unocss/unocss/tree/main/packages/shared-integration
将 @unocss/shared-integration 打包并增加一些功能
import { transformedCode } from "shared-integration";
const css = await transformedCode('.a { @apply p-4 block .dark:c-red @dark:c-red; }');
变量 css
将转变为:
.a { display:block;padding:1rem; }
.dark .a{--un-text-opacity:1;color:rgba(248,113,113,var(--un-text-opacity));}
@media (prefers-color-scheme: dark){
.a{--un-text-opacity:1;color:rgba(248,113,113,var(--un-text-opacity));}
}