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

fix(preset-mini): handle arbitrary gradients correctly #3589

Merged
merged 2 commits into from
Mar 3, 2024

Conversation

henrikvilhelmberglund
Copy link
Contributor

@henrikvilhelmberglund henrikvilhelmberglund commented Mar 1, 2024

This PR makes arbitrary gradients in bg-[] work by returning background-image instead of background-color when linear-gradient/conic-gradient/radial-gradient are detected.

fixes #3581

before:
brave-2024-03-01-16-44-brave_dLkrF2n6Fx

after:
brave-2024-03-01-16-44-brave_DvVctQOvej

<div class="bg-[linear-gradient(45deg,#0072ff,#00d2e8,#04fd8f,#70fd6c)] border-1 h-64 w-64 flex items-center text-center"></div>

<div class="bg-[conic-gradient(red,blue)] border-1 h-64 w-64 flex items-center text-center"></div>

<div class="bg-[radial-gradient(red,blue)] border-1 h-64 w-64 flex items-center text-center"></div>

Copy link

netlify bot commented Mar 1, 2024

Deploy Preview for unocss ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 743c57f
🔍 Latest deploy log https://app.netlify.com/sites/unocss/deploys/65e1fa46c4a7df0008379daf
😎 Deploy Preview https://deploy-preview-3589--unocss.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@antfu antfu enabled auto-merge March 3, 2024 21:54
@antfu antfu added this pull request to the merge queue Mar 3, 2024
Merged via the queue into unocss:main with commit 84088d8 Mar 3, 2024
9 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.

Arbitrary gradient value generated output uses background-color instead of background-image
2 participants