Skip to content

Limit paragraph max-width in API docs#15672

Merged
straight-shoota merged 1 commit intocrystal-lang:masterfrom
straight-shoota:feat/doc-generator-max-width
Apr 19, 2025
Merged

Limit paragraph max-width in API docs#15672
straight-shoota merged 1 commit intocrystal-lang:masterfrom
straight-shoota:feat/doc-generator-max-width

Conversation

@straight-shoota
Copy link
Member

Limits the width of text paragraphs in the API docs for increased readability.
Previously, the width was unlimited, which leads to long line lengths that are hard to read.

Body copy:

Before After
grafik grafik

The exact width may be up for debate. But 42em seems good to me.

Also limits the width of inherited methods, but they get more space because it's not body copy.

Inherited methods list:

Before After
grafik grafik

Copy link
Collaborator

@ysbaddaden ysbaddaden left a comment

Choose a reason for hiding this comment

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

Definitely better.

Apparently the maximum paragraph should be around 75 characters, according to typographers: https://css-tricks.com/six-tips-for-better-web-typography/#aa-rule-1-set-a-good-max-width-for-paragraphs

@straight-shoota straight-shoota added this to the 1.17.0 milestone Apr 17, 2025
@straight-shoota straight-shoota merged commit ab3a5bf into crystal-lang:master Apr 19, 2025
36 checks passed
@straight-shoota straight-shoota deleted the feat/doc-generator-max-width branch April 19, 2025 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants