Trying to create a gradient image background in CSS using Angular 6 with the CLI template. Everything looks great in dev mode, but when I switch to the production version (ng build "--prod"), the CSS code becomes invalid.
Here is the SCSS file:
.home-content {
.mountain-header {
margin: 0 auto;
color: #fff;
padding: 30px 10px;
min-height: 110px;
background: linear-gradient(180deg, rgba(0, 174, 199, .8) 0%, rgba(35,97,146,.8) 100%), url("https://cdnsite/background2.jpg") no-repeat !important;
background-size: cover !important;
background-position: center !important;
}
But after minification, the background property changes to:
background: linear-gradient(180deg,rgba(0,174,199,.8) 0,rgba(35,97,146,.8) 100%) center!important/cover!important,url(https://cdnsite/background2.jpg) center!important/cover!important no-repeat!important!important!important
If I remove the URL from the background property, everything works fine in production mode (I see the correct background-size and background-position). It seems like the properties are getting merged when the URL is included in the background property.