Skip to content

Commit 93a4266

Browse files
Added missing scopes to SCSS (#2994)
1 parent b713ca5 commit 93a4266

File tree

8 files changed

+336
-42
lines changed

8 files changed

+336
-42
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
* {
2+
@if true { }
3+
@else if false { }
4+
@else { }
5+
}
6+
---
7+
8+
[Range] =
9+
[Domain] = 1:2-3:11
10+
>------------
11+
1| @if true { }
12+
2| @else if false { }
13+
3| @else { }
14+
-----------<
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
* {
2+
@if true { }
3+
@else if false { }
4+
@else { }
5+
}
6+
---
7+
8+
[#1 Content] =
9+
[#1 Domain] = 1:2-1:14
10+
>------------<
11+
1| @if true { }
12+
13+
[#1 Removal] = 1:3-2:8
14+
>-----------
15+
1| @if true { }
16+
2| @else if false { }
17+
--------<
18+
19+
[#1 Leading delimiter] = 1:0-1:2
20+
>--<
21+
1| @if true { }
22+
23+
[#1 Insertion delimiter] = "\n"
24+
25+
26+
[#2 Content] =
27+
[#2 Domain] = 2:2-2:20
28+
>------------------<
29+
2| @else if false { }
30+
31+
[#2 Removal] = 2:0-3:0
32+
>--------------------
33+
2| @else if false { }
34+
3| @else { }
35+
<
36+
37+
[#2 Leading delimiter] = 2:0-2:2
38+
>--<
39+
2| @else if false { }
40+
41+
[#2 Insertion delimiter] = "\n"
42+
43+
44+
[#3 Content] =
45+
[#3 Domain] = 3:2-3:11
46+
>---------<
47+
3| @else { }
48+
49+
[#3 Removal] = 3:0-4:0
50+
>-----------
51+
3| @else { }
52+
4| }
53+
<
54+
55+
[#3 Leading delimiter] = 3:0-3:2
56+
>--<
57+
3| @else { }
58+
59+
[#3 Insertion delimiter] = "\n"
Lines changed: 42 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,54 @@
11
* {
2-
@if $container-width < $base-width { }
2+
@if true { }
3+
@else if false { }
34
@else { }
45
}
56
---
67

7-
[Content] = 1:6-1:36
8-
>------------------------------<
9-
1| @if $container-width < $base-width { }
8+
[#1 Content] = 1:6-1:10
9+
>----<
10+
1| @if true { }
1011

11-
[Removal] = 1:6-1:37
12-
>-------------------------------<
13-
1| @if $container-width < $base-width { }
12+
[#1 Removal] = 1:6-1:11
13+
>-----<
14+
1| @if true { }
1415

15-
[Leading delimiter] = 1:5-1:6
16+
[#1 Leading delimiter] = 1:5-1:6
1617
>-<
17-
1| @if $container-width < $base-width { }
18+
1| @if true { }
1819

19-
[Trailing delimiter] = 1:36-1:37
20-
>-<
21-
1| @if $container-width < $base-width { }
20+
[#1 Trailing delimiter] = 1:10-1:11
21+
>-<
22+
1| @if true { }
2223

23-
[Domain] = 1:2-2:11
24-
>--------------------------------------
25-
1| @if $container-width < $base-width { }
26-
2| @else { }
24+
[#1 Domain] = 1:2-3:11
25+
>------------
26+
1| @if true { }
27+
2| @else if false { }
28+
3| @else { }
2729
-----------<
2830

29-
[Insertion delimiter] = " "
31+
[#1 Insertion delimiter] = " "
32+
33+
34+
[#2 Content] = 2:11-2:16
35+
>-----<
36+
2| @else if false { }
37+
38+
[#2 Removal] = 2:11-2:17
39+
>------<
40+
2| @else if false { }
41+
42+
[#2 Leading delimiter] = 2:10-2:11
43+
>-<
44+
2| @else if false { }
45+
46+
[#2 Trailing delimiter] = 2:16-2:17
47+
>-<
48+
2| @else if false { }
49+
50+
[#2 Domain] = 2:2-2:20
51+
>------------------<
52+
2| @else if false { }
53+
54+
[#2 Insertion delimiter] = " "
Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,28 @@
11
* {
2-
@if $container-width < $base-width { }
2+
@if true { }
3+
@else if false { }
34
@else { }
45
}
56
---
67

78
[Content] =
8-
[Domain] = 1:2-2:11
9-
>--------------------------------------
10-
1| @if $container-width < $base-width { }
11-
2| @else { }
9+
[Domain] = 1:2-3:11
10+
>------------
11+
1| @if true { }
12+
2| @else if false { }
13+
3| @else { }
1214
-----------<
1315

14-
[Removal] = 1:0-3:0
15-
>----------------------------------------
16-
1| @if $container-width < $base-width { }
17-
2| @else { }
18-
3| }
16+
[Removal] = 1:0-4:0
17+
>--------------
18+
1| @if true { }
19+
2| @else if false { }
20+
3| @else { }
21+
4| }
1922
<
2023

2124
[Leading delimiter] = 1:0-1:2
2225
>--<
23-
1| @if $container-width < $base-width { }
26+
1| @if true { }
2427

2528
[Insertion delimiter] = "\n"
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
@function foo() { }
2+
---
3+
4+
[#1 Content] =
5+
[#1 Removal] = 0:17-0:18
6+
>-<
7+
0| @function foo() { }
8+
9+
[#1 Domain] = 0:0-0:19
10+
>-------------------<
11+
0| @function foo() { }
12+
13+
[#1 Insertion delimiter] = " "
14+
15+
16+
[#2 Content] =
17+
[#2 Removal] = 0:14-0:14
18+
><
19+
0| @function foo() { }
20+
21+
[#2 Domain] = 0:13-0:15
22+
>--<
23+
0| @function foo() { }
24+
25+
[#2 Insertion delimiter] = " "
26+
27+
28+
[#3 Content] =
29+
[#3 Removal] = 0:17-0:18
30+
>-<
31+
0| @function foo() { }
32+
33+
[#3 Domain] = 0:16-0:19
34+
>---<
35+
0| @function foo() { }
36+
37+
[#3 Insertion delimiter] = " "
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
* {
2+
@if true { }
3+
@else if false { }
4+
@else { }
5+
}
6+
---
7+
8+
[#1 Content] = 1:2-3:11
9+
>------------
10+
1| @if true { }
11+
2| @else if false { }
12+
3| @else { }
13+
-----------<
14+
15+
[#1 Removal] = 0:3-4:0
16+
>
17+
0| * {
18+
1| @if true { }
19+
2| @else if false { }
20+
3| @else { }
21+
4| }
22+
<
23+
24+
[#1 Domain] = 0:0-4:1
25+
>---
26+
0| * {
27+
1| @if true { }
28+
2| @else if false { }
29+
3| @else { }
30+
4| }
31+
-<
32+
33+
[#1 Insertion delimiter] = " "
34+
35+
36+
[#2 Content] = 1:2-3:11
37+
>------------
38+
1| @if true { }
39+
2| @else if false { }
40+
3| @else { }
41+
-----------<
42+
43+
[#2 Removal] = 0:3-4:0
44+
>
45+
0| * {
46+
1| @if true { }
47+
2| @else if false { }
48+
3| @else { }
49+
4| }
50+
<
51+
52+
[#2 Domain] = 0:2-4:1
53+
>-
54+
0| * {
55+
1| @if true { }
56+
2| @else if false { }
57+
3| @else { }
58+
4| }
59+
-<
60+
61+
[#2 Insertion delimiter] = " "
62+
63+
64+
[#3 Content] =
65+
[#3 Removal] = 1:12-1:13
66+
>-<
67+
1| @if true { }
68+
69+
[#3 Domain] = 1:2-1:14
70+
>------------<
71+
1| @if true { }
72+
73+
[#3 Insertion delimiter] = " "
74+
75+
76+
[#4 Content] =
77+
[#4 Removal] = 1:12-1:13
78+
>-<
79+
1| @if true { }
80+
81+
[#4 Domain] = 1:11-1:14
82+
>---<
83+
1| @if true { }
84+
85+
[#4 Insertion delimiter] = " "
86+
87+
88+
[#5 Content] =
89+
[#5 Removal] = 2:18-2:19
90+
>-<
91+
2| @else if false { }
92+
93+
[#5 Domain] = 2:2-2:20
94+
>------------------<
95+
2| @else if false { }
96+
97+
[#5 Insertion delimiter] = " "
98+
99+
100+
[#6 Content] =
101+
[#6 Removal] = 2:18-2:19
102+
>-<
103+
2| @else if false { }
104+
105+
[#6 Domain] = 2:17-2:20
106+
>---<
107+
2| @else if false { }
108+
109+
[#6 Insertion delimiter] = " "
110+
111+
112+
[#7 Content] =
113+
[#7 Removal] = 3:9-3:10
114+
>-<
115+
3| @else { }
116+
117+
[#7 Domain] = 3:2-3:11
118+
>---------<
119+
3| @else { }
120+
121+
[#7 Insertion delimiter] = " "
122+
123+
124+
[#8 Content] =
125+
[#8 Removal] = 3:9-3:10
126+
>-<
127+
3| @else { }
128+
129+
[#8 Domain] = 3:8-3:11
130+
>---<
131+
3| @else { }
132+
133+
[#8 Insertion delimiter] = " "

packages/common/src/scopeSupportFacets/scss.ts

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@ import { cssScopeSupport } from "./css";
22
import type { LanguageScopeSupportFacetMap } from "./scopeSupportFacets.types";
33
import { ScopeSupportFacetLevel } from "./scopeSupportFacets.types";
44

5-
const { supported, unsupported } = ScopeSupportFacetLevel;
5+
const { supported } = ScopeSupportFacetLevel;
66

77
export const scssScopeSupport: LanguageScopeSupportFacetMap = {
88
...cssScopeSupport,
99

1010
"comment.line": supported,
1111

12-
"condition.if": supported,
13-
1412
namedFunction: supported,
1513
"namedFunction.iteration.block": supported,
1614
"namedFunction.iteration.document": supported,
@@ -27,15 +25,13 @@ export const scssScopeSupport: LanguageScopeSupportFacetMap = {
2725
"value.argument.formal.iteration": supported,
2826
"value.return": supported,
2927

30-
ifStatement: supported,
31-
3228
"textFragment.comment.line": supported,
3329

34-
// Unsupported
35-
36-
"branch.if": unsupported,
37-
"branch.if.iteration": unsupported,
30+
ifStatement: supported,
31+
"branch.if": supported,
32+
"branch.if.iteration": supported,
33+
"condition.if": supported,
3834

39-
"interior.function": unsupported,
40-
"interior.if": unsupported,
35+
"interior.if": supported,
36+
"interior.function": supported,
4137
};

0 commit comments

Comments
 (0)