question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Skipping remote @import of "https://fonts.googleapis.com/ removes remote import from result

See original GitHub issue

Environment

  • clean-css version - 4.1.3
  • node.js version - 6.10.2
  • operating system: Mac OS Sierra 10.12.3

Configuration options

Using along with grunt-contrib-cssmin

cssmin: {
	options: {
		tidyAtRules: false
	},
	styles: {
		files: {
			'<%= less.compileFile %>': ['<%= vendor_files.css %>', '<%= less.compileFile %>']
		}
	}
}

Tried to use options: tidyAtRules: false; inline: false; inline: [‘local’]; inline: [‘local’, ‘remote’, ‘!fonts.googleapis.com’].

Input CSS

Concatenation of a dozen of vendor css files and main app file (compiled from less). Vendor files should be before main css. Main file is started with:

@import url(https://fonts.googleapis.com/css?family=Roboto:300,400,700,900,900italic,700italic,400italic&subset=latin);@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,700,600italic);

Actual output CSS

Minified concatenation of files without @import rules.

Expected output CSS

Minified concatenation of files with @import rules at the top of the file.

If I change files order: main file before vendors, @import rules become at the top in the source and remains in the result. Looks like them are deleted from result during concatenation.

UPD. Rechecked it with previous concatenation: the same issue. @import rules in the middle of the file just were removed.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:16

github_iconTop GitHub Comments

5reactions
ivanffcommented, Feb 26, 2020

It DOESN’t WORK, the quality of the PLUGIN IS just TERRIBLE, it’S been 3 years, and during this time the developer has not been able to fix it!

@import url(“https://fonts.googleapis.com/css?family=Open+Sans:300,300 и,400,400 и,600,600 i,700,700 i,800,800 i|PT+Sans:400,700&subset=cyrillic-ext”);

1reaction
flixx-chcommented, May 29, 2020

It DOESN’t WORK, the quality of the PLUGIN IS just TERRIBLE, it’S been 3 years, and during this time the developer has not been able to fix it!

Same same here! It’s a shame that the bug still hasn’t been fixed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues - GitHub
Skipping remote @import of "https://fonts.googleapis.com/ removes remote ... Looks like them are deleted from result during concatenation.
Read more >
clean-css - Bountysource
Skipping remote @import of "https://fonts.googleapis.com/ removes remote import from result.
Read more >
How to make sure remote @imports are processed correctly ...
I use Grunt to build my project and cssmin task inside. My CSS file contains a remote @import statements and ...
Read more >
Material Symbols and Icons - Google Fonts
Material Symbols are our newest icons consolidating over 2500 glyphs in a single font file with a wide range of design variants.
Read more >
How to Remove Google Fonts from your WordPress Theme
Find out which function loads the Fonts. Google Fonts are loaded from an URL looking similar to this: https://fonts.googleapis.com/css?family= ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found