File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed
Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change 1+ import { Meta } from ' @storybook/addon-docs/blocks' ;
2+
3+ <Meta title = " Setup - Tailwind CSS" />
4+
5+ # Tailwind CSS setup guide
6+
7+ We provide a Tailwind CSS 4 theme that you can use to access colors, typography,
8+ spacing, and other design tokens defined in our design system. The theme also
9+ removes Tailwind's default tokens so that you don't accidentally use them.
10+
11+ ## Install the package
12+
13+ To use the theme, first install the ` @scouterna/tailwind-theme ` package. It can
14+ be installed as a development dependency since it's only needed during build
15+ time.
16+
17+ ``` bash
18+ pnpm install -D @scouterna/tailwind-theme
19+ ```
20+
21+ You also need to load the Source Sans 3 font under the name `"Source Sans 3
22+ Variable"`. We recommend you get it through Fontsource:
23+
24+ ``` bash
25+ pnpm install @fontsource-variable/source-sans-3
26+ ```
27+
28+ ## Usage
29+
30+ In your style file where you import Tailwind CSS you must:
31+ - Import our Tailwind theme .
32+ - Import the Source Sans 3 font .
33+ - Set the correct defaults on the body element.
34+
35+ This is how your style file could look like:
36+
37+ ``` css
38+ @import " tailwindcss" ;
39+ @import " @scouterna/tailwind-theme" ;
40+
41+ @import " @fontsource-variable/source-sans-3" ;
42+
43+ body {
44+ font-family : " Source Sans 3 Variable" , sans-serif ;
45+ font-size : var (--text-body-base );
46+ line-height : 1.5 ;
47+ color : var (--color-text-base );
48+ }
49+ ```
You can’t perform that action at this time.
0 commit comments