We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
x
I have gone back to 10.1.3 and the problem exists there.
When SCSS opacity values are provided as percentages they are always converted to 1% when run the cli runs with --prod.
opacity
1%
--prod
ng new opacity-bug --style scss
app.component.html
app.component.scss
ng serve --prod
<div class="toolbar"></div>
.toolbar { position: absolute; top: 0; left: 0; right: 0; height: 60px; background-color: #1976d2; opacity: 80%; }
Inspect the .toolbar style in the browser and observe:
.toolbar[_ngcontent-sja-c0] { position: absolute; top: 0; left: 0; right: 0; height: 60px; background-color: #1976d2; opacity: 1%; }
This issue does not appear when running in development mode (e.g. ng serve)
ng serve
Angular CLI: 11.2.1 Node: 12.20.2 OS: linux x64 Angular: 11.2.2 ... animations, common, compiler, compiler-cli, core, forms ... platform-browser, platform-browser-dynamic, router Ivy Workspace: Yes Package Version --------------------------------------------------------- @angular-devkit/architect 0.1102.1 @angular-devkit/build-angular 0.1102.1 @angular-devkit/core 11.2.1 @angular-devkit/schematics 11.2.1 @angular/cli 11.2.1 @schematics/angular 11.2.1 @schematics/update 0.1102.1 rxjs 6.6.3
Anything else relevant?
Using opacity: .8 fixes the problem
opacity: .8
The text was updated successfully, but these errors were encountered:
This appears to be a cssnano problem: cssnano/cssnano#957
cssnano
Sorry, something went wrong.
Indeed this is a CSSNano problem which is not actionable by the Angular CLI.
Duplicate of #17516
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
No branches or pull requests
馃悶 Bug report
Command (mark with an
x
)Is this a regression?
I have gone back to 10.1.3 and the problem exists there.
Description
A clear and concise description of the problem...When SCSS
opacity
values are provided as percentages they are always converted to1%
when run the cli runs with--prod
.馃敩 Minimal Reproduction
ng new opacity-bug --style scss
app.component.html
andapp.component.scss
values with the example below.ng serve --prod
app.component.html
app.component.scss
馃敟 Exception or Error
Inspect the .toolbar style in the browser and observe:
This issue does not appear when running in development mode (e.g.
ng serve
)馃實 Your Environment
Anything else relevant?
Using
opacity: .8
fixes the problemThe text was updated successfully, but these errors were encountered: