Snow Crash Snow Crash - 4 months ago 8
CSS Question

@import url('my.site/my-style.css') not working

I have this line at the bottom of my WordPress style.css file:

@import url("http://my.site/wp-content/themes/mytheme/my-styles.css");


If I enter
http://my.site/wp-content/themes/mytheme/my-styles.css
into a web browser the file resolves and can be downloaded.

However, none of the styles in
my-styles.css
are being read.

Any suggestions?

Answer

The @import rule has to come first in your CSS file.