From 1b361714bc4e6b4707dab9f39689999895d9de1d Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 14 Aug 2026 16:44:03 +0000 Subject: [PATCH] Fix headings rendering as normal text in documents The document editor and reading views style content with Tailwind Typography classes (prose, prose-lg, prose-headings:*, dark:prose-invert), but the @tailwindcss/typography plugin was never installed, so none of those classes generated any CSS. Tailwind's preflight reset then collapsed h2/h3/h4 to paragraph size and weight, so applying any of the editor's three header options produced text that looked completely unchanged on the document reading view. Install @tailwindcss/typography and register it in tailwind.config.js so the prose classes already present across the app's views take effect. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01E4YsrszSBT4ReLYDx3arEu --- package.json | 1 + tailwind.config.js | 1 + yarn.lock | 15 +++++++++++++++ 3 files changed, 17 insertions(+) diff --git a/package.json b/package.json index 5091d40f0..08b0d2b26 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "@rails/ujs": "^7.1.3-4", "@rails/webpacker": "^5.2.1", "@tailwindcss/forms": "^0.5.0", + "@tailwindcss/typography": "^0.5.20", "@types/react": "^17.0.13", "autoprefixer": "^10", "axios": "^0.21.2", diff --git a/tailwind.config.js b/tailwind.config.js index 7fc053c5d..df6917960 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -104,6 +104,7 @@ module.exports = { }, plugins: [ require('@tailwindcss/forms'), + require('@tailwindcss/typography'), function({ addUtilities }) { addUtilities({ '.text-shadow': { diff --git a/yarn.lock b/yarn.lock index bc46f04c0..46b1a0c79 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1288,6 +1288,13 @@ dependencies: mini-svg-data-uri "^1.2.3" +"@tailwindcss/typography@^0.5.20": + version "0.5.20" + resolved "https://registry.yarnpkg.com/@tailwindcss/typography/-/typography-0.5.20.tgz#9feb7fb1d5f2f7b5360c22e24651210db74c34df" + integrity sha512-hwbzQuNUfcPvbegQFatVPl/MY/tcM9KLl963hQ5laJKPh81TEZ1+dNG9PirGvcaDBkp+BCshExAyKVPW91dozw== + dependencies: + postcss-selector-parser "6.0.10" + "@types/glob@^7.1.1": version "7.2.0" resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.2.0.tgz#bc1b5bf3aa92f25bd5dd39f35c57361bdce5b2eb" @@ -6399,6 +6406,14 @@ postcss-selector-not@^4.0.0: balanced-match "^1.0.0" postcss "^7.0.2" +postcss-selector-parser@6.0.10: + version "6.0.10" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz#79b61e2c0d1bfc2602d549e11d0876256f8df88d" + integrity sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w== + dependencies: + cssesc "^3.0.0" + util-deprecate "^1.0.2" + postcss-selector-parser@^3.0.0: version "3.1.2" resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz#b310f5c4c0fdaf76f94902bbaa30db6aa84f5270"