css @import url using "//" instead of "http://" (to support https)
In the child theme's style.css file, the first non-comment is:
Code:
@import url("http://fonts.googleapis.com/css?family=Open+Sans:400,700");
With that code as it is shown above, here is how my site behaves:
- On pages that use HTTP, my site text appears in the "Open Sans" font.
- On pages that use HTTPS (e.g. the Login page), my site text appears in the fallback font (something other than "Open Sans").
I fixed this by changing the CSS above into the following (i.e. I removed the "http:" part):
Code:
@import url("//fonts.googleapis.com/css?family=Open+Sans:400,700");
That causes the browser to use the same scheme (i.e. "http" or "https") the page was requested with.
After having made that change, here is how my site behaves:
- On pages that use HTTP, my site text appears in the "Open Sans" font.
- On pages that use HTTPS, my site text appears in the "Open Sans" font.
Tested using Firefox 26.0.
--
Reference:
http://www.paulirish.com/2010/the-pr...-relative-url/