Skip to content

Commit b1da449

Browse files
committed
remove invalid layer() case
1 parent a17169e commit b1da449

File tree

2 files changed

+0
-27
lines changed

2 files changed

+0
-27
lines changed

src/index.js

-7
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,6 @@ export function layer_tree_from_ast(ast) {
9898
return this.skip
9999
}
100100

101-
// @import url("foo.css") layer();
102-
let layer_fn = csstree.find(prelude, n => n.type === 'Function' && n.name.toLowerCase() === 'layer')
103-
if (layer_fn) {
104-
root.add_child([], get_anonymous_id(), location)
105-
return this.skip
106-
}
107-
108101
// @import url("foo.css") layer;
109102
let layer_keyword = csstree.find(prelude, n => n.type === 'Identifier' && n.name.toLowerCase() === 'layer')
110103
if (layer_keyword) {

test/import.spec.js

-20
Original file line numberDiff line numberDiff line change
@@ -22,26 +22,6 @@ test('@import url() LAYER', () => {
2222
assert.equal(actual, expected)
2323
})
2424

25-
test('@import url() layer()', () => {
26-
let actual = layer_tree('@import url("foo.css") layer();')
27-
let expected = [{
28-
name: '__anonymous-1__',
29-
locations: [{ line: 1, column: 1, start: 0, end: 31 }],
30-
children: []
31-
}]
32-
assert.equal(actual, expected)
33-
})
34-
35-
test('@import url() LAYER()', () => {
36-
let actual = layer_tree('@import url("foo.css") LAYER();')
37-
let expected = [{
38-
name: '__anonymous-1__',
39-
locations: [{ line: 1, column: 1, start: 0, end: 31 }],
40-
children: []
41-
}]
42-
assert.equal(actual, expected)
43-
})
44-
4525
test('@import url() layer(named)', () => {
4626
let actual = layer_tree('@import url("foo.css") layer(named);')
4727
let expected = [{

0 commit comments

Comments
 (0)