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

feat: add preflight option for presets #1616

Merged
merged 6 commits into from Sep 20, 2022
Merged

feat: add preflight option for presets #1616

merged 6 commits into from Sep 20, 2022

Conversation

zyyv
Copy link
Member

@zyyv zyyv commented Sep 19, 2022

close #1456

Add preflight option to let user decide whether to generate preflight in preset.

In one case, I used unocss to generate a component, which will be build with a preflight style by default. But when I import the component in a project with unocss, the preflight style is generated twice, which is unnecessary. This PR leaves the decision to the user.

image

image

@zyyv zyyv requested a review from antfu as a code owner Sep 19, 2022
@netlify
Copy link

netlify bot commented Sep 19, 2022

Deploy Preview for unocss canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit ee9eb3a
🔍 Latest deploy log https://app.netlify.com/sites/unocss/deploys/632874db2f9b8700099a43a6

@zyyv zyyv requested a review from chu121su12 Sep 19, 2022
@antfu antfu changed the title feat(preset-mini,wind,uno): add preflight option feat: add preflight option for presets Sep 20, 2022
@antfu antfu enabled auto-merge (squash) Sep 20, 2022
antfu
antfu approved these changes Sep 20, 2022
@antfu antfu merged commit ae1008a into unocss:main Sep 20, 2022
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

有没有办法可以去掉那些用不到的css变量?
2 participants