Skip to content

feat(typography): add FluxTypography prose component#24

Open
basmilius wants to merge 2 commits into
mainfrom
feat/typography
Open

feat(typography): add FluxTypography prose component#24
basmilius wants to merge 2 commits into
mainfrom
feat/typography

Conversation

@basmilius

@basmilius basmilius commented Jul 11, 2026

Copy link
Copy Markdown
Owner

Summary

Introduces FluxTypography, a prose wrapper that scopes Flux's rich typographic system so it only applies to opted-in document content. Outside the component, only light element defaults remain: heading sizes, links and the monospace font.

What changed

New components

  • FluxTypography — prose wrapper with tag, as-child and container props. container caps the content at a centered reading measure via --flux-typography-container (default 90ch).
  • FluxTypographyReset — opts a nested subtree out of the prose styling (e.g. a Flux component dropped into an article) while it keeps flowing in the vertical rhythm.

Styling

  • Moved the vertical rhythm, decorated blockquote and image treatment out of the global stylesheet into .typography.
  • Kept light element defaults global (heading sizes/weights, links, monospace, small).
  • Reset bare ul/ol styling globally; rich lists return inside the component.
  • Aligned the prose table with the FluxTable component (borders, header, padding, left-aligned headers).

Docs

  • New Typography component page with runnable examples (headings, paragraphs, lists, blockquote, code, table, reset, full article).
  • Wrapped the guide examples in FluxTypography and migrated the flyout demo.
  • VitePress theme carve-outs ([data-flux-typography]) so previews render with the real Flux typography instead of the docs theme's prose styling.

Breaking change

The automatic vertical spacing between bare headings, paragraphs, lists, blockquotes and images no longer applies globally. Wrap document content in <FluxTypography> to restore it.

Summary by CodeRabbit

  • New Features

    • Added the Typography component for consistent styling of headings, paragraphs, lists, quotes, code, tables, and images.
    • Added Typography Reset support for preserving custom content styling.
    • Added configurable element tags, content width, and wrapper-free rendering.
    • Added comprehensive Typography documentation, examples, and live previews.
  • Bug Fixes

    • Prevented documentation styles from overriding content rendered through Typography.
    • Improved default list reset behavior for more predictable styling.

Introduce FluxTypography, a prose wrapper that scopes the rich typographic
system (vertical rhythm, decorated blockquotes, lists, code, tables, images)
that used to apply globally. Outside the component only light element defaults
remain: heading sizes, links and the monospace font.

- Add FluxTypography with tag, as-child and container props
- Add FluxTypographyReset to opt a subtree out of the prose styling while it
  keeps flowing in the vertical rhythm
- Reset bare list styling globally; align prose tables with FluxTable
- Add docs page, runnable examples and VitePress theme carve-outs so previews
  render with the real Flux typography

BREAKING CHANGE: the automatic vertical spacing between bare headings,
paragraphs, lists, blockquotes and images no longer applies globally. Wrap
document content in FluxTypography to restore it.
@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@basmilius, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 46 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4d862353-4404-4e0f-aa1e-24538918f018

📥 Commits

Reviewing files that changed from the base of the PR and between 05438e8 and 005be90.

📒 Files selected for processing (2)
  • docs/components/typography.md
  • packages/components/src/css/component/Typography.module.scss

Walkthrough

Changes

The PR adds FluxTypography and FluxTypographyReset, introduces scoped prose styling, adds Typography documentation and examples, updates existing examples to use the wrapper, and prevents VitePress styles from overriding Typography content.

Typography feature

Layer / File(s) Summary
Typography component runtime
packages/components/src/component/*
Adds typed typography wrappers with configurable tags, container styling, child rendering, reset attributes, and public exports.
Scoped typography styling
packages/components/src/css/*
Adds prose styling for headings, lists, quotes, code, tables, images, and containers while reducing global typography defaults.
Typography documentation examples
docs/code/components/typography/*, docs/code/guide/introduction/typography/*, docs/code/components/flyout/preview.vue
Adds Typography demonstrations and wraps existing documentation content with FluxTypography.
Typography documentation page
docs/components/typography.md, docs/guide/introduction/typography.md, docs/.vitepress/component-navigation.ts
Adds the component API page, examples, guide clarification, and sidebar navigation entry.
Documentation theme scoping
docs/.vitepress/theme/*
Excludes data-flux-typography descendants from VitePress heading, paragraph, list, quote, divider, and code overrides.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant DocumentationExample
  participant FluxTypography
  participant RenderedMarkup
  participant TypographyStyles
  DocumentationExample->>FluxTypography: provide typography content
  FluxTypography->>RenderedMarkup: render wrapper or single child
  TypographyStyles->>RenderedMarkup: apply scoped prose styles
Loading

Poem

I’m a rabbit with a typographic pen,
Making headings hop neatly again.
Lists march in line, tables shine bright,
Code blocks curl up just right.
New docs bloom where examples grow—
Thump-thump hooray for prose in flow!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change by introducing the FluxTypography prose component.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/code/components/typography/article.vue`:
- Around line 82-83: Replace the empty alt attribute on the content image with a
concise, meaningful description of the depicted delicate arch and night-star
landscape. Keep the existing image source and surrounding documentation
unchanged.

In `@docs/code/guide/introduction/typography/image.vue`:
- Around line 2-6: Replace the empty alt attribute on the landscape image inside
FluxTypography with concise descriptive text that conveys the photo’s content,
preserving the existing image source and typography demonstration.

In `@docs/components/typography.md`:
- Line 39: Update the prose describing reading content to hyphenate “long-form”
when it appears as a compound adjective before “reading,” leaving the
surrounding typography guidance unchanged.

In `@packages/components/src/css/component/Typography.module.scss`:
- Line 124: Replace the deprecated word-break: break-word declaration in the
Typography styles with overflow-wrap: break-word, preserving the existing
wrapping behavior and matching the established reset.scss pattern.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 64feaab9-0125-4bd8-bdc5-cfe9608d8899

📥 Commits

Reviewing files that changed from the base of the PR and between a222949 and 05438e8.

📒 Files selected for processing (27)
  • docs/.vitepress/component-navigation.ts
  • docs/.vitepress/theme/FluxView.vue
  • docs/.vitepress/theme/override/vp-doc.css
  • docs/.vitepress/theme/style.css
  • docs/code/components/flyout/preview.vue
  • docs/code/components/typography/article.vue
  • docs/code/components/typography/blockquote.vue
  • docs/code/components/typography/code.vue
  • docs/code/components/typography/headings.vue
  • docs/code/components/typography/lists.vue
  • docs/code/components/typography/paragraph.vue
  • docs/code/components/typography/preview.vue
  • docs/code/components/typography/reset.vue
  • docs/code/components/typography/table.vue
  • docs/code/guide/introduction/typography/blockquote.vue
  • docs/code/guide/introduction/typography/headings.vue
  • docs/code/guide/introduction/typography/image.vue
  • docs/code/guide/introduction/typography/lists.vue
  • docs/code/guide/introduction/typography/paragraph.vue
  • docs/components/typography.md
  • docs/guide/introduction/typography.md
  • packages/components/src/component/FluxTypography.vue
  • packages/components/src/component/FluxTypographyReset.vue
  • packages/components/src/component/index.ts
  • packages/components/src/css/component/Typography.module.scss
  • packages/components/src/css/reset.scss
  • packages/components/src/css/typography.scss
💤 Files with no reviewable changes (1)
  • packages/components/src/css/typography.scss

Comment thread docs/code/components/typography/article.vue
Comment thread docs/code/guide/introduction/typography/image.vue
Comment thread docs/components/typography.md Outdated
Comment thread packages/components/src/css/component/Typography.module.scss Outdated
- Use overflow-wrap instead of the deprecated word-break in table cells
- Hyphenate "long-form" in the docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant