Why is Gatsby removing duplicate/fallback css properties? And how do I prevent this behavior when using a global stylesheet.
I am building a static site with gatsbyjs. I have written a global stylesheet (layout.css) that I have attached to a layout component.
In that global stylesheet I have this style:
.wrapper.style3 {
background-color: red;
background-image: -moz-linear-gradient(top, rgba(0,0,0,0), rgba(0,0,0,0.15)), url("../images/bg01.png");
background-image: -webkit-linear-gradient(top, rgba(0,0,0,0), rgba(0,0,0,0.15)), url("../images/bg01.png");
background-image: -ms-linear-gradient(top, rgba(0,0,0,0), rgba(0,0,0,0.15)), url("../images/bg01.png");
background-image: linear-gradient(top, rgba(0,0,0,0), rgba(0,0,0,0.15)), url("../images/bg01.png");
color: #fff;
}
Then whenever I use gatsby develop or I serve the files built by gatsby build
the resulting style produced ignores/deletes all the fallback values for the background-image property.
The resulting style being served is
.wrapper.style3 {
background-color: red;
background-image: linear-gradient(top,transparent,rgba(0,0,0,.15)),url("../images/bg01.png");
color: #fff
}
If I delete the last background-image property then the new last background-image property is used in the resulting css. This leads me to believe that gatsby is de-duplicating css properties.
Why does it do this and how can I prevent fallback property values from getting removed from the resulting stylesheet? I want the fallback values for cross browser compatibility.
I am not using any plugins.
Gatsby CLI version: 4.13.0
Gatsby version: 4.13.0
Nodejs: v16.15.0