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

Add option to disable #RGBA color output for a CSS loader #1419

Closed
anwerso opened this issue Jul 4, 2021 · 2 comments
Closed

Add option to disable #RGBA color output for a CSS loader #1419

anwerso opened this issue Jul 4, 2021 · 2 comments

Comments

@anwerso
Copy link

anwerso commented Jul 4, 2021

minify option generate #RGBA/#RRGGBBAA color, which not widely supported at the moment.

echo div { color: rgba(0, 0, 0, 0.2) } | esbuild --loader=css --minify
div{color:#0003}

Can we add an option to disable this transformation?

@evanw
Copy link
Owner

evanw commented Jul 4, 2021

This can be done in esbuild by setting one or more target browsers: https://esbuild.github.io/api/#target. For example:

echo "div { color: rgba(0, 0, 0, 0.2) }" | esbuild --loader=css --minify --target=chrome61
div{color:rgba(0,0,0,.2)}

@anwerso
Copy link
Author

anwerso commented Jul 4, 2021

Oh, for some reason I missed this option. Thank you.

I'll copy my browserslist section there.

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

No branches or pull requests

2 participants