Treat ".css" imports as plain imports. (#48)

This commit is contained in:
Natalie Weizenbaum 2016-11-18 15:43:21 -08:00 committed by GitHub
parent ab1ff78bf8
commit dd2fa6f574

View File

@ -675,7 +675,8 @@ abstract class StylesheetParser extends Parser {
/// Returns whether [url] indicates that an `@import` is a plain CSS import.
bool _isPlainImportUrl(String url) {
if (url.length < "//".length) return false;
if (url.length < 5) return false;
if (url.endsWith(".css")) return true;
var first = url.codeUnitAt(0);
if (first == $slash) return url.codeUnitAt(1) == $slash;