Fix document headers rendering as normal text - #1471
Open
drusepth wants to merge 1 commit into
Open
Conversation
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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E4YsrszSBT4ReLYDx3arEu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #
Changes proposed:
@tailwindcss/typography(v0.5.20) and register it intailwind.config.js, so theprose,prose-lg,prose-headings:*, anddark:prose-invertclasses already used across ~32 views actually generate CSS<h2>/<h3>/<h4>tags were applied correctly, but with the plugin missing, Tailwind's preflight reset collapsed every heading to paragraph size/weight on the document reading view (verified: an<h2>computed to 16px / weight 400, identical to a<p>; after this change it renders 36px / bold)Known follow-ups surfaced during review (not included in this PR):
app/javascript/application.cssimports Tailwind layers as base → utilities → components; the plugin's.prosecomponent rules therefore land after utilities and overridemax-w-none/text-gray-900on prose containers. Should be reordered to base → components → utilities..prosemargin rules intimeline_viewer.scssanddocument_editor.scss(specificity 0,1,1) still override the plugin's:where()-based spacing site-wide, e.g..prose h1-h6 { margin-top: 0 }.#editor h2/h3/h4rules ineditor.scss, so editor and reading view render headings slightly differently.@indentlabs/contributors
🤖 Generated with Claude Code
https://claude.ai/code/session_01E4YsrszSBT4ReLYDx3arEu
Generated by Claude Code