Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【Feature】Skip the load on demand detection and generate all variables #67

Open
itmanyong opened this issue Nov 11, 2023 · 1 comment
Labels
PR Welcome Welcome anyone solve this issue

Comments

@itmanyong
Copy link

itmanyong commented Nov 11, 2023

Examples include the following presets and uses

{
  theme:{
    colors:{
      red: 'red',
      green: 'green'
    }
  },
  presets: [
    presetUno(),
    presetTheme({
      prefix: '--theme',
      theme: {
        light: {
          red: 'red',
          green: 'green'
        }
      }
    })
  ]
}
<button class="text-red">按钮</button>

presetTheme generates the associated style variable

:root:{
  --theme-colors-red:255, 0, 0
}

The current desired build result

:root:{
  --theme-colors-red:255, 0, 0,
  --theme-colors-green:0, 255, 0
}

Regardless of whether the corresponding css variable is used in the source code, it is directly generated. Add a configuration switch?

@itmanyong itmanyong changed the title 【Feature】提供配置用以控制跳过unocss样式检测,直接生成所有已配置的css变量 【Feature】Skip the load on demand detection and generate all variables Nov 11, 2023
@Dunqing
Copy link
Member

Dunqing commented Nov 13, 2023

Sounds good. I'll think about making it happen.

@Dunqing Dunqing added the PR Welcome Welcome anyone solve this issue label Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR Welcome Welcome anyone solve this issue
Projects
None yet
Development

No branches or pull requests

2 participants