---
title: "@stillwind-undef-variant"
description: "Remove built-in or plugin variant definitions that match a name or a prefix."
image: "https://stillwind.dev/og.png"
---

> Documentation Index
> Fetch the complete documentation index at: https://stillwind.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# @stillwind-undef-variant

```css
@stillwind-undef-variant name;
@stillwind-undef-variant prefix-*;
@stillwind-undef-variant *;
```

`@stillwind-undef-variant` removes the matching variant definitions that
register before it. A removed variant becomes unknown, and
[unknown-variant](/docs/lints/unknown-variant) reports its uses. Write it at the
top level of the stylesheet or in a
[@stillwind-registry](/docs/at-rules/stillwind-registry) block.

## Example

### Stylesheet

```css
@stillwind-undef-variant print;
```

### Source

```tsx
import { style } from "stillwind/react";

export const toolbar = style("print:hidden");
```

### Compiled code

```ts
export const toolbar = {};
```

### Generated stylesheet without preflight

```css
/*! stillwind v0.0.0 | MIT License | https://stillwind.dev */
/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
@layer properties, theme, base, components, utilities;
```

`print:hidden` produces no class, because `print` is unknown.

Patterns and registration order work as in
[@stillwind-undef-utility](/docs/at-rules/stillwind-undef-utility). A
[@custom-variant](/docs/at-rules/custom-variant) after the statement can define
a variant with the removed name again.

Source: https://stillwind.dev/docs/at-rules/stillwind-undef-variant/index.mdx
