In my tests and studies it is background-image: 'bg.png';completely invalid. According to MDN, it background-imagemust be defined as a keyword or <image>, which, when accessing an image file, must use a function url.
For @importhowever, the function urlis optional and there is no difference.
Invalid:
.class {
background-image: 'bg.png';
}
Really:
.class {
background-image: url('bg.png');
}
Valid and accurate:
@import 'file.css';
@import url('file.css');
source
share