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

Bug: Opacity Reduces to 1% When Adding a Background Image with a defined Opacity #20569

Closed
Jackmt9 opened this issue Jan 11, 2021 · 2 comments
Closed
Labels
Resolution: Support Redirect Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug

Comments

@Jackmt9
Copy link

Jackmt9 commented Jan 11, 2021

React version: 16.13.1

Steps To Reproduce

  1. Set a css property background-image: url(...)
  2. Deploy the project (BUG ONLY VISIBLE ON PRODUCTION BUILD)

Link to code example: https://github.com/Jackmt9/portfolio_site/tree/9f6b1f53f33f22386cf473bdc956774027059035
(See about and home page - there should be an image there.)

The current behavior

Opacity of the image reduces to 1%

The expected behavior

Opacity should be as defined, not 1%

##Workaround
Set the opacity value as a decimal instead of a percentage (90% => 0.9)

@Jackmt9 Jackmt9 added the Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug label Jan 11, 2021
@Jackmt9
Copy link
Author

Jackmt9 commented Jan 11, 2021

Also see: facebook/create-react-app#7980

@eps1lon
Copy link
Collaborator

eps1lon commented Jan 11, 2021

Thanks for the report.

As you already discovered, this issue was already reported in create-react-app where it was identified that the issue is with https://github.com/NMFR/optimize-css-assets-webpack-plugin (facebook/create-react-app#7980 (comment)).

I recommend opening an issue in https://github.com/NMFR/optimize-css-assets-webpack-plugin as this issue is not actionable from within the React repository. A fix or workaround is only viable from the create-react-app or optimize-css-assets-webpack-plugin repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Support Redirect Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug
Projects
None yet
Development

No branches or pull requests

2 participants