Skip to content

Commit 8f29a96

Browse files
committed
Disable CSS optimization temporarily
1 parent 2c16b01 commit 8f29a96

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

packages/tailwindcss-language-server/tests/colors/colors.test.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ withFixture('v4/basic', (c) => {
101101
],
102102
})
103103

104+
/*
104105
testColors('opacity modifier', {
105106
text: '<div class="bg-red-500/20">',
106107
expected: [
@@ -115,6 +116,7 @@ withFixture('v4/basic', (c) => {
115116
},
116117
],
117118
})
119+
*/
118120

119121
testColors('arbitrary value', {
120122
text: '<div class="bg-[red]">',
@@ -131,6 +133,7 @@ withFixture('v4/basic', (c) => {
131133
],
132134
})
133135

136+
/*
134137
testColors('arbitrary value and opacity modifier', {
135138
text: '<div class="bg-[red]/[0.33]">',
136139
expected: [
@@ -146,4 +149,5 @@ withFixture('v4/basic', (c) => {
146149
},
147150
],
148151
})
152+
*/
149153
})

packages/tailwindcss-language-service/src/util/color.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,11 @@ function getColorFromRoot(state: State, css: postcss.Root): culori.Color | Keywo
144144
})
145145

146146
// Optimize the CSS if possible
147-
try {
148-
let str = state.designSystem.toCss(css)
149-
str = state.designSystem.optimizeCss(str)
150-
css = postcss.parse(str)
151-
} catch {}
147+
// try {
148+
// let str = state.designSystem.toCss(css)
149+
// str = state.designSystem.optimizeCss(str)
150+
// css = postcss.parse(str)
151+
// } catch {}
152152

153153
css.walkDecls((decl) => {
154154
decls[decl.prop] ??= []

0 commit comments

Comments
 (0)