Skip to content

Commit d4f76b0

Browse files
Remove heading abstraction
1 parent 25d9377 commit d4f76b0

File tree

2 files changed

+39
-38
lines changed

2 files changed

+39
-38
lines changed

src/components/heading.tsx

Lines changed: 0 additions & 24 deletions
This file was deleted.

src/docs/functions-and-directives.mdx

Lines changed: 39 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { H3 } from '@/components/heading';
21
import { CodeExampleStack } from "@/components/code-example";
32

43
export const title = "Functions and directives";
@@ -8,7 +7,9 @@ export const description = "A reference for the custom functions and directives
87

98
Directives are custom Tailwind-specific [at-rules](https://developer.mozilla.org/en-US/docs/Web/CSS/At-rule) you can use in your CSS that offer special functionality for Tailwind CSS projects.
109

11-
<H3 id="import-directive">@import</H3>
10+
<h3 id="import-directive">
11+
<a href="#import-directive">@import</a>
12+
</h3>
1213

1314
Use the `@import` directive to inline import CSS files, including Tailwind itself:
1415

@@ -17,7 +18,9 @@ Use the `@import` directive to inline import CSS files, including Tailwind itsel
1718
@import "tailwindcss";
1819
```
1920

20-
<H3 id="theme-directive">@theme</H3>
21+
<h3 id="theme-directive">
22+
<a href="#theme-directive">@theme</a>
23+
</h3>
2124

2225
Use the `@theme` directive to define your project's custom design tokens, like fonts, colors, and breakpoints:
2326

@@ -44,7 +47,9 @@ Use the `@theme` directive to define your project's custom design tokens, like f
4447

4548
Learn more about customizing your theme in the [theme variables documentation](/docs/theme).
4649

47-
<H3 id="source-directive">@source</H3>
50+
<h3 id="source-directive">
51+
<a href="#source-directive">@source</a>
52+
</h3>
4853

4954
Use the `@source` directive to explicitly specify source files that aren't picked up by Tailwind's automatic content detection:
5055

@@ -55,7 +60,9 @@ Use the `@source` directive to explicitly specify source files that aren't picke
5560

5661
Learn more about automatic content detection in the [detecting classes in source files documentation](/docs/detecting-classes-in-source-files).
5762

58-
<H3 id="utility-directive">@utility</H3>
63+
<h3 id="utility-directive">
64+
<a href="#utility-directive">@utility</a>
65+
</h3>
5966

6067
Use the `@utility` directive to add custom utilities to your project that work with variants like `hover`, `focus` and `lg`:
6168

@@ -68,7 +75,9 @@ Use the `@utility` directive to add custom utilities to your project that work w
6875

6976
Learn more about registering custom utilities in the [adding custom utilities documentation](/docs/adding-custom-styles#adding-custom-utilities).
7077

71-
<H3 id="variant-directive">@variant</H3>
78+
<h3 id="variant-directive">
79+
<a href="#variant-directive">@variant</a>
80+
</h3>
7281

7382
Use the `@variant` directive to apply a Tailwind variant to styles in your CSS:
7483

@@ -86,7 +95,9 @@ Use the `@variant` directive to apply a Tailwind variant to styles in your CSS:
8695

8796
Learn more using variants in the [using variants documentation](/docs/adding-custom-styles#using-variants).
8897

89-
<H3 id="custom-variant-directive">@custom-variant</H3>
98+
<h3 id="custom-variant-directive">
99+
<a href="#custom-variant-directive">@custom-variant</a>
100+
</h3>
90101

91102
Use the `@custom-variant` directive to add a custom variant in your project:
92103

@@ -99,7 +110,9 @@ This lets you write utilities `theme-midnight:bg-black` and `theme-midnight:text
99110

100111
Learn more about adding custom variants in the [adding custom variants documentation](/docs/adding-custom-styles#adding-custom-variants).
101112

102-
<H3 id="apply-directive">@apply</H3>
113+
<h3 id="apply-directive">
114+
<a href="#apply-directive">@apply</a>
115+
</h3>
103116

104117
Use the `@apply` directive to inline any existing utility classes into your own custom CSS:
105118

@@ -123,7 +136,9 @@ Use the `@apply` directive to inline any existing utility classes into your own
123136

124137
This is useful when you need to write custom CSS (like to override the styles in a third-party library) but still want to work with your design tokens and use the same syntax you’re used to using in your HTML.
125138

126-
<H3 id="reference-directive">@reference</H3>
139+
<h3 id="reference-directive">
140+
<a href="#reference-directive">@reference</a>
141+
</h3>
127142

128143
If you want to use `@apply` or `@variant` in the `<style>` block of a Vue or Svelte component, or within CSS modules, you will need to import your theme variables, custom utilities, and custom variants to make those values available in that context.
129144

@@ -167,7 +182,9 @@ If you’re just using the default theme with no customizations, you can import
167182

168183
Tailwind provides the following build-time functions to make working with colors and the spacing scale easier.
169184

170-
<H3 id="alpha-function">--alpha()</H3>
185+
<h3 id="alpha-function">
186+
<a href="#alpha-function">--alpha()</a>
187+
</h3>
171188

172189
Use the `--alpha()` function to adjust the opacity of a color:
173190

@@ -190,7 +207,9 @@ Use the `--alpha()` function to adjust the opacity of a color:
190207

191208
</CodeExampleStack>
192209

193-
<H3 id="spacing-function">--spacing()</H3>
210+
<h3 id="spacing-function">
211+
<a href="#spacing-function">--spacing()</a>
212+
</h3>
194213

195214
Use the `--spacing()` function to generate a spacing value based on your theme:
196215

@@ -227,7 +246,9 @@ This can also be useful in arbitrary values, especially in combination with `cal
227246

228247
The following directives and functions exist solely for compatibility with Tailwind CSS v3.x.
229248

230-
<H3 id="config-directive">@config</H3>
249+
<h3 id="config-directive">
250+
<a href="#config-directive">@config</a>
251+
</h3>
231252

232253
Use the `@config` directive to load a legacy JavaScript-based configuration file:
233254

@@ -238,7 +259,9 @@ Use the `@config` directive to load a legacy JavaScript-based configuration file
238259

239260
The `corePlugins`, `safelist`, and `separator` options from the JavaScript-based config are not supported in v4.0.
240261

241-
<H3 id="plugin-directive">@plugin</H3>
262+
<h3 id="plugin-directive">
263+
<a href="#plugin-directive">@plugin</a>
264+
</h3>
242265

243266
Use the `@plugin` directive to load a legacy JavaScript-based plugin:
244267

@@ -249,7 +272,9 @@ Use the `@plugin` directive to load a legacy JavaScript-based plugin:
249272

250273
The `@plugin` directive accepts either a package name or a local path.
251274

252-
<H3 id="theme-function">theme()</H3>
275+
<h3 id="theme-function">
276+
<a href="#theme-function">theme()</a>
277+
</h3>
253278

254279
Use the `theme()` function to access your Tailwind theme values using dot notation:
255280

0 commit comments

Comments
 (0)