From 965048c01ac41a2c597754eb75773fcb2a96a677 Mon Sep 17 00:00:00 2001 From: Robin Malfait Date: Wed, 29 Jan 2025 15:32:37 +0100 Subject: [PATCH] Remove the `force` variant (#16007) This PR will remove the `force` variant. This was an experiment that we accidentally shipped, but there is no documentation nor is there any intellisense autocompletion for it. --- .../src/__snapshots__/intellisense.test.ts.snap | 7 ------- packages/tailwindcss/src/variants.test.ts | 9 --------- packages/tailwindcss/src/variants.ts | 1 - 3 files changed, 17 deletions(-) diff --git a/packages/tailwindcss/src/__snapshots__/intellisense.test.ts.snap b/packages/tailwindcss/src/__snapshots__/intellisense.test.ts.snap index c65d54b102fd..d58d605473a1 100644 --- a/packages/tailwindcss/src/__snapshots__/intellisense.test.ts.snap +++ b/packages/tailwindcss/src/__snapshots__/intellisense.test.ts.snap @@ -7504,13 +7504,6 @@ exports[`getClassList 1`] = ` exports[`getVariants 1`] = ` [ - { - "hasDash": true, - "isArbitrary": false, - "name": "force", - "selectors": [Function], - "values": [], - }, { "hasDash": true, "isArbitrary": false, diff --git a/packages/tailwindcss/src/variants.test.ts b/packages/tailwindcss/src/variants.test.ts index cc600b9cedaf..ce99fb52efdc 100644 --- a/packages/tailwindcss/src/variants.test.ts +++ b/packages/tailwindcss/src/variants.test.ts @@ -6,15 +6,6 @@ import { Compounds, compoundsForSelectors } from './variants' const css = String.raw -test('force', async () => { - expect(await run(['force:flex'])).toMatchInlineSnapshot(` - ".force\\:flex { - display: flex; - }" - `) - expect(await run(['force/foo:flex'])).toEqual('') -}) - test('*', async () => { expect(await run(['*:flex'])).toMatchInlineSnapshot(` ":is(.\\*\\:flex > *) { diff --git a/packages/tailwindcss/src/variants.ts b/packages/tailwindcss/src/variants.ts index 3d3e145c629f..20f84c867453 100644 --- a/packages/tailwindcss/src/variants.ts +++ b/packages/tailwindcss/src/variants.ts @@ -365,7 +365,6 @@ export function createVariants(theme: Theme): Variants { ) } - variants.static('force', () => {}, { compounds: Compounds.Never }) staticVariant('*', [':is(& > *)'], { compounds: Compounds.Never }) staticVariant('**', [':is(& *)'], { compounds: Compounds.Never })