Skip to content

Commit 1d505e9

Browse files
committed
Revert "Remove blocklisted classes from autocomplete (#10844)"
This reverts commit f1473f5.
1 parent f1473f5 commit 1d505e9

File tree

3 files changed

+0
-18
lines changed

3 files changed

+0
-18
lines changed

CHANGELOG.md

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2929
- Disallow multiple selectors in arbitrary variants ([#10655](https://github.com/tailwindlabs/tailwindcss/pull/10655))
3030
- Sort class lists deterministically for Prettier plugin ([#10672](https://github.com/tailwindlabs/tailwindcss/pull/10672))
3131
- Ensure CLI builds have a non-zero exit code on failure ([#10703](https://github.com/tailwindlabs/tailwindcss/pull/10703))
32-
- Remove blocklisted classes from autocomplete ([#10844](https://github.com/tailwindlabs/tailwindcss/pull/10844))
3332

3433
### Changed
3534

src/lib/setupContextUtils.js

-5
Original file line numberDiff line numberDiff line change
@@ -1007,11 +1007,6 @@ function registerPlugins(plugins, context) {
10071007
}
10081008
}
10091009

1010-
// Exclude utilities that are known non-classes (e.g. from the blocklist)
1011-
if (context.notClassCache.size > 0) {
1012-
output = output.filter((cls) => !context.notClassCache.has(cls))
1013-
}
1014-
10151010
return output
10161011
}
10171012

tests/getClassList.test.js

-12
Original file line numberDiff line numberDiff line change
@@ -191,18 +191,6 @@ crosscheck(() => {
191191
expect(classes).not.toContain('bg-red-500/50')
192192
})
193193

194-
it('should not generate utilities that are present in the blocklist', () => {
195-
let config = {
196-
blocklist: ['font-bold'],
197-
}
198-
199-
let context = createContext(resolveConfig(config))
200-
let classes = context.getClassList()
201-
202-
expect(classes).toContain('font-normal')
203-
expect(classes).not.toContain('font-bold')
204-
})
205-
206194
it('should not generate utilities that are set to undefined or null to so that they are removed', () => {
207195
let config = {
208196
theme: {

0 commit comments

Comments
 (0)