Revert "Remove blocklisted classes from autocomplete (#10844)"

This reverts commit f1473f53bb.
This commit is contained in:
Jordan Pittman 2023-03-23 15:18:49 -04:00
parent f1473f53bb
commit 1d505e9c8c
3 changed files with 0 additions and 18 deletions

View file

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

View file

@ -1007,11 +1007,6 @@ function registerPlugins(plugins, context) {
}
}
// Exclude utilities that are known non-classes (e.g. from the blocklist)
if (context.notClassCache.size > 0) {
output = output.filter((cls) => !context.notClassCache.has(cls))
}
return output
}

View file

@ -191,18 +191,6 @@ crosscheck(() => {
expect(classes).not.toContain('bg-red-500/50')
})
it('should not generate utilities that are present in the blocklist', () => {
let config = {
blocklist: ['font-bold'],
}
let context = createContext(resolveConfig(config))
let classes = context.getClassList()
expect(classes).toContain('font-normal')
expect(classes).not.toContain('font-bold')
})
it('should not generate utilities that are set to undefined or null to so that they are removed', () => {
let config = {
theme: {