Skip to content

fix(styles): label two-column tables when stacked and keep short code whole - #11

Merged
aicayzer merged 1 commit into
mainfrom
fix/table-labels-and-code-wrap
Nov 29, 2026
Merged

aicayzer merged 1 commit into
mainfrom
fix/table-labels-and-code-wrap

Conversation

@aicayzer

Copy link
Copy Markdown
Contributor

Summary

A table that stacks on a narrow column now names the second cell of a two-column table, as it already did for wider tables, and short inline code such as invalid-argument no longer splits at its hyphen. Bumps the kit to 0.0.1-alpha.6.

Changes

  • labelTable labels every cell after the first, in a two-column table too. The first cell stays the unlabelled title of the entry, as in three-column tables.
  • rehypeTableLabels marks inline code of 24 characters or fewer with data-short. The stylesheet keeps code[data-short] on one line. Longer code, such as a default value or a URL, still wraps as before, in prose and in table cells, stacked or not.
  • Tests cover the two-column label, the marking (prose, table cell, and a pre left alone) and the two rules. README says what the plugin does now.
  • Version 0.0.1-alpha.6.

Testing

  • pnpm types:check, pnpm test (358 tests), pnpm build and pnpm pack:check pass.
  • Packed the kit and ran InkKit's site and the docs.marfa.so site from scratch copies against it, at 390 and 768 px. InkKit Overview now reads "Your app does, through" before the second cell. On /docs/load-and-save the stale-document that wrapped under alpha.5 stays whole. /reference/errors and /reference/styling show no sideways scroll, and Styling's long defaults, such as color-mix(...), still wrap. On docs.marfa.so, the Glossary and Limits pages stack with no overflow and no short code wrapped.
  • Not tested: Safari and Firefox.

Notes for reviewers

A short-code threshold of 24 characters is a judgment call: a short name fits a stacked cell, and a longer one wraps rather than overflow. A site that does not use rehypeTableLabels keeps the old wrapping. No export, class or custom property changed.

Checklist

  • The title is a scoped Conventional Commit.
  • New behavior has a test that was seen failing first, or no test was needed and the reason is above.
  • Docs, comments and the contract still say what is true after this change.

@aicayzer
aicayzer merged commit bf02b4d into main Nov 29, 2026
6 checks passed
@aicayzer
aicayzer deleted the fix/table-labels-and-code-wrap branch November 29, 2026 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant