You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suggest more appropriate at-rules based on context
- v4 doesn’t have `@screen`
- `@apply` doesn’t make sense to suggest top-level
- `@tailwind` doesn’t make sense to suggest in v4 — we want people to use the imports instead
- Things like `@config`, `@plugin`, `@source` etc… all must be top-level
}\` styles into your CSS.\n\n[Tailwind CSS Documentation](${docsUrl(
1507
+
state.version,
1508
+
'functions-and-directives/#tailwind',
1509
+
)})`,
1510
+
},
1511
+
})
1512
+
}
1502
1513
1503
-
items.push({
1504
-
label: '@screen',
1505
-
documentation: {
1506
-
kind: 'markdown'astypeofMarkupKind.Markdown,
1507
-
value: `The \`@screen\` directive allows you to create media queries that reference your breakpoints by name instead of duplicating their values in your own CSS.\n\n[Tailwind CSS Documentation](${docsUrl(
1508
-
state.version,
1509
-
'functions-and-directives/#screen',
1510
-
)})`,
1511
-
},
1512
-
})
1514
+
if(!state.v4){
1515
+
items.push({
1516
+
label: '@screen',
1517
+
documentation: {
1518
+
kind: 'markdown'astypeofMarkupKind.Markdown,
1519
+
value: `The \`@screen\` directive allows you to create media queries that reference your breakpoints by name instead of duplicating their values in your own CSS.\n\n[Tailwind CSS Documentation](${docsUrl(
1520
+
state.version,
1521
+
'functions-and-directives/#screen',
1522
+
)})`,
1523
+
},
1524
+
})
1525
+
}
1513
1526
1514
-
items.push({
1515
-
label: '@apply',
1516
-
documentation: {
1517
-
kind: 'markdown'astypeofMarkupKind.Markdown,
1518
-
value: `Use \`@apply\` to inline any existing utility classes into your own custom CSS.\n\n[Tailwind CSS Documentation](${docsUrl(
1519
-
state.version,
1520
-
'functions-and-directives/#apply',
1521
-
)})`,
1522
-
},
1523
-
})
1527
+
if(isNested){
1528
+
items.push({
1529
+
label: '@apply',
1530
+
documentation: {
1531
+
kind: 'markdown'astypeofMarkupKind.Markdown,
1532
+
value: `Use \`@apply\` to inline any existing utility classes into your own custom CSS.\n\n[Tailwind CSS Documentation](${docsUrl(
1533
+
state.version,
1534
+
'functions-and-directives/#apply',
1535
+
)})`,
1536
+
},
1537
+
})
1538
+
}
1524
1539
1525
1540
if(semver.gte(state.version,'1.8.0')){
1526
1541
items.push({
@@ -1560,7 +1575,7 @@ function provideCssDirectiveCompletions(
1560
1575
})
1561
1576
}
1562
1577
1563
-
if(semver.gte(state.version,'3.2.0')){
1578
+
if(semver.gte(state.version,'3.2.0')&&!isNested){
1564
1579
items.push({
1565
1580
label: '@config',
1566
1581
documentation: {
@@ -1573,7 +1588,7 @@ function provideCssDirectiveCompletions(
0 commit comments