Skip to content

Background images defined in CSS via background: url("data:image/svg+xml ...)are not rendered in IE in prod mode #17564

@onebalaban

Description

@onebalaban

🐞 bug report

Is this a regression?

Yes, the previous version in which this bug was not present was: v8.

Description

A clear and concise description of the problem...

Background images defined in CSS via background: url("data:image/svg+xml ...)are not rendered in IE in prod mode.

🔬 Minimal Reproduction

  1. Open this GitHub repo: https://github.com/onebalaban/svgbackgroundissue

  2. Run npm install

  3. Run ng serve --prod

  4. Open the http://localhost:4200/ page in Chrome. You will see this picture:

Screen Shot 2020-04-28 at 12 08 36

5) Open the same page in IE 11. Nothing is shown.

🌍 Your Environment

Angular Version:




Angular CLI: 9.1.1
Node: 13.9.0
OS: win32 x64

Angular: 9.1.2
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.901.1
@angular-devkit/build-angular     0.901.1
@angular-devkit/build-optimizer   0.901.1
@angular-devkit/build-webpack     0.901.1
@angular-devkit/core              9.1.1
@angular-devkit/schematics        9.1.1
@angular/cli                      9.1.1
@ngtools/webpack                  9.1.1
@schematics/angular               9.1.1
@schematics/update                0.901.1
rxjs                              6.5.5
typescript                        3.8.3
webpack                           4.42.0

Anything else relevant?
IE 11.657.18362.0 Update versions 11.0.175 (KB4537767) on Windows 10 v1909 build 18363.657

It seems that CSS minification/bundling changes somehow the source CSS code.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions