Skip to content

Commit

Permalink
Remove the force variant (#16007)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
RobinMalfait authored Jan 29, 2025
1 parent 3da9d61 commit 965048c
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7504,13 +7504,6 @@ exports[`getClassList 1`] = `

exports[`getVariants 1`] = `
[
{
"hasDash": true,
"isArbitrary": false,
"name": "force",
"selectors": [Function],
"values": [],
},
{
"hasDash": true,
"isArbitrary": false,
Expand Down
9 changes: 0 additions & 9 deletions packages/tailwindcss/src/variants.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 > *) {
Expand Down
1 change: 0 additions & 1 deletion packages/tailwindcss/src/variants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 })

Expand Down

0 comments on commit 965048c

Please sign in to comment.