Skip to content

Commit d0bbafd

Browse files
authored
Tailwind typography plugin (#88)
* Install and configure `@tailwindcss/typography` * Update content.css
1 parent d750839 commit d0bbafd

File tree

4 files changed

+6
-10
lines changed

4 files changed

+6
-10
lines changed

bun.lockb

-33 Bytes
Binary file not shown.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"@inertiajs/vue3": "^1.2.0",
55
"@sentry/vue": "^8.30.0",
66
"@tailwindcss/forms": "^0.5.9",
7+
"@tailwindcss/typography": "^0.5.15",
78
"@vitejs/plugin-vue": "^5.1.4",
89
"autoprefixer": "^10.4.20",
910
"laravel-vite-plugin": "^1.0.5",

resources/css/content.css

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
@layer components {
22
.content {
3+
@apply prose text-neutral-700;
4+
35
h1,
46
h2,
57
h3,
68
h4,
79
h5,
810
h6 {
9-
@apply text-brand-900 font-heading;
10-
11-
a {
12-
@apply text-brand-800 hover:no-underline;
13-
}
11+
@apply font-heading font-bold text-neutral-900;
1412
}
1513

1614
h1 {
@@ -77,18 +75,14 @@
7775
@apply border-b border-brand-200;
7876
}
7977

80-
> * + * {
81-
@apply mt-6;
82-
}
83-
8478
* {
8579
& + h1,
8680
& + h2,
8781
& + h3,
8882
& + h4,
8983
& + h5,
9084
& + h6 {
91-
@apply mt-12;
85+
@apply mt-8;
9286
}
9387
}
9488
}

tailwind.config.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,6 @@ module.exports = {
4444

4545
plugins: [
4646
require('@tailwindcss/forms'),
47+
require('@tailwindcss/typography'),
4748
],
4849
}

0 commit comments

Comments
 (0)