I have a main.less file. I am running the grunt package: grunt-contrib-less on it to produce css. The generated css file has the following newly inserted at the top (with all other references correctly converted into css):
@import url(http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic);
grunt config:
less: {
dev: {
src: ['<%= app_files.temp_less %>'],
dest: '<%= wwwroot_dir %>/assets/<%= pkg.name %>-<%= pkg.version %>.css',
options: {
compress: false,
ieCompat: true,
dumpLineNumbers: "comments"
}
This is causing browser errors due to the main page being requested over https yet this making requests over http. Presumably this is happening as the less compilation cant resolve the font? I would like to either include the font so the import statement doesn't appear OR change the URI of the font to: //fonts.googleapis.com.... so that it uses the parents calling method i.e. https. What is the 'correct' way of doing this?
i just realized that all the 'compiler' is doing is copying the css from any @import
referenced files. In one of these was the above @import
statement. I simply found the reference in my project in a less file hidden in a deep dark folder and changed it to //fonts.googleapis.com
.... and on compilation this is pulled in instead.