Skip to content

feat(Markdown): contentAlign prop, list/table indent, blockquote border - #1290

Merged
cixzhang merged 1 commit into
mainfrom
navi/feat/markdown-nits
Apr 11, 2026
Merged

cixzhang merged 1 commit into
mainfrom
navi/feat/markdown-nits

Conversation

@cixzhang

Copy link
Copy Markdown
Contributor

Changes

Markdown

  • contentAlign prop ('start' | 'center', default: 'start') — controls alignment of prose content within the container when contentWidth is narrower than available space. Center alignment uses marginInline: auto.
  • List/table block indent — lists and tables get marginInline: calc(-1 * --spacing-2) via xstyle on the inner component (XDSList, XDSCheckboxList, <table>), keeping outer wrapper margins clean for spacing/alignment.
  • Tables center-align when contentAlign='center' — table element gets marginInline: auto so it centers within its full-width scroll wrapper. Overflow beyond prose width is symmetric.
  • Blockquote border — changed from --color-accent to --color-border-emphasized for subtler, more consistent appearance.
  • Split proseWidth dynamic style — maxWidth and marginInline are now separate dynamic styles (proseWidth + proseAlign) so they don't conflict with blockIndent.

Stories

  • Added WithImages story (landscape, portrait, panoramic)
  • Added Content Align: Start and Content Align: Center stories with 580px prose in 900px container

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Apr 11, 2026
@cixzhang
cixzhang enabled auto-merge (squash) April 11, 2026 23:25
@github-actions

github-actions Bot commented Apr 11, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

🧪 Sandbox Preview

View Sandbox for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

Modified Components

Markdown · View in Storybook
Metric Before After Delta
Bundle Size (ESM) N/A 1.1KB N/A
Lines of Code N/A 1798 -
Complexity N/A Very High (160) -

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@xds/core 15.0KB 23.6KB 3.6KB

Accessibility Audit

Status: 2 accessibility violation(s) found — 1 critical, 1 serious.

XDSMarkdown - 2 issue(s)
  • 🔴 critical: Ensure an element's role supports its ARIA attributes
    • Rule: aria-allowed-attr · Affects 4/9 stories · Learn more
    • WCAG: 4.1.2 (Level A)
  • 🟠 serious: Ensure interactive controls are not nested as they are not always announced by screen readers or can cause focus problems for assistive technologies
    • Rule: nested-interactive · Affects 1/9 stories · Learn more
    • WCAG: 4.1.2 (Level A)

Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

@cixzhang
cixzhang merged commit e923fc1 into main Apr 11, 2026
15 checks passed
josephfarina added a commit that referenced this pull request Apr 12, 2026
…ix Chat @example

Found during Night Watch doc review (2026-04-12).

- Fix XDSChatTokenizedText @example: remove blank lines and JS comments
  inside code block (reintroduced by #1249)
- Add xds-chat-layout theming target to Chat.doc.mjs (new in #1249)
- Add missing Markdown props: contentWidth, contentAlign, sources,
  citationStyle (from #1289, #1290)
- Add missing CodeBlock props: isCollapsible, collapsibleThreshold
- Add Thumbnail theming section (xds-thumbnail target)
- Add Thumbnail common props: xstyle, className, style, data-testid
- Add Thumbnail docsZh and docsDense translations
- Add Thumbnail accessibility section

Co-authored-by: Navi <[email protected]>
cixzhang added a commit that referenced this pull request Apr 26, 2026
cixzhang added a commit that referenced this pull request Jun 21, 2026
cixzhang added a commit that referenced this pull request Jun 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant