Skip to content

Commit 61dd148

Browse files
committed
Remove @layer replacements
These are no longer needed
1 parent 40b072b commit 61dd148

File tree

1 file changed

+0
-6
lines changed
  • packages/tailwindcss-language-server/src/language

1 file changed

+0
-6
lines changed

packages/tailwindcss-language-server/src/language/rewriting.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,6 @@ function replaceWithStyleRule(delta = 0) {
2929
* errors for things that aren't actually errors.
3030
*/
3131
export function rewriteCss(css: string) {
32-
// Remove inline `@layer` directives
33-
// TODO: This should be unnecessary once we have updated the bundled CSS
34-
// language service
35-
css = css.replace(/@layer\s+[^;{]+(;|$)/g, '')
36-
3732
css = css.replace(/@screen(\s+[^{]+){/g, replaceWithAtRule(-2))
3833
css = css.replace(/@variants(\s+[^{]+){/g, replaceWithAtRule())
3934
css = css.replace(/@responsive(\s*){/g, replaceWithAtRule())
@@ -47,7 +42,6 @@ export function rewriteCss(css: string) {
4742

4843
css = css.replace(/@(custom-variant)(\s+[^{]+){/g, replaceWithStyleRule())
4944
css = css.replace(/@(variant)(\s+[^{]+){/g, replaceWithStyleRule())
50-
css = css.replace(/@layer(\s+[^{]{2,}){/g, replaceWithAtRule(-3))
5145
css = css.replace(/@reference\s*([^;]{2,})/g, '@import $1')
5246

5347
css = css.replace(

0 commit comments

Comments
 (0)