Skip to content

Commit

Permalink
Merge 8be1589 into e005ff5
Browse files Browse the repository at this point in the history
  • Loading branch information
kristerkari committed Jan 28, 2020
2 parents e005ff5 + 8be1589 commit 858beaf
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
24 changes: 24 additions & 0 deletions src/rules/at-import-partial-extension/__tests__/index.js
Expand Up @@ -74,6 +74,12 @@ testRule(rule, {
description:
"Import CSS from the web, https://, trailing spaces inside quotes"
},
{
code: `
@import 'https://fonts.googleapis.com/css?family=Montserrat:400,600&display=swap';
`,
description: "Import CSS from the web, https:// with comma"
},
{
code: `
@import "//_file.scss";
Expand Down Expand Up @@ -105,6 +111,12 @@ testRule(rule, {
`,
description: "Import CSS (with media queries - url + media)."
},
{
code: `
@import url('https://fonts.googleapis.com/css?family=Montserrat:400,600&display=swap');
`,
description: "Import CSS from the web, https:// with comma"
},
{
code: `
@import _file.scss tv, screen;
Expand Down Expand Up @@ -218,6 +230,12 @@ testRule(rule, {
description:
"Import CSS from the web, https://, trailing spaces inside quotes"
},
{
code: `
@import 'https://fonts.googleapis.com/css?family=Montserrat:400,600&display=swap';
`,
description: "Import CSS from the web, https:// with comma"
},
{
code: `
@import "//_file.scss";
Expand Down Expand Up @@ -249,6 +267,12 @@ testRule(rule, {
`,
description: "Import CSS (with media queries - url + media)."
},
{
code: `
@import url('https://fonts.googleapis.com/css?family=Montserrat:400,600&display=swap');
`,
description: "Import CSS from the web, https:// with comma"
},
{
code: `
@import _file.scss tv, screen;
Expand Down
2 changes: 1 addition & 1 deletion src/rules/at-import-partial-extension/index.js
Expand Up @@ -41,7 +41,7 @@ export default function(expectation) {

root.walkAtRules("import", decl => {
const paths = decl.params
.split(",")
.split(/["']\s*,/)
.filter(path => !mediaQueryTypesRE.test(path.trim()));

// Processing comma-separated lists of import paths
Expand Down

0 comments on commit 858beaf

Please sign in to comment.