ionic-team / capacitor-docgen

Docs Readme Markdown and JSON Generator for Capacitor Plugins.
https://capacitorjs.com/
Other
12 stars 8 forks source link

style: formatting for readability #11

Closed aparajita closed 3 years ago

aparajita commented 3 years ago

Motivation

I have 30 years experience in typography, graphic design and readability that guided these changes.

I removed the code styles (except for fenced code blocks) for a few reasons:

I added more vertical space between tables to make it easier for the eye to pick out the beginning of the table.

If a type has more than three alternates, it is split up into multiple lines, which greatly improves readability. For example, instead of this:

Prop Type Details
iosImageDisplayMode "top" | "center" | "bottom" | "fill" | "aspectFill" | "fit" | "left" | "right" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" The mode used to place and scale an image splash screen. Ignored for storyboard-based splash screens.

you get this:

Prop Type Details
iosImageDisplayMode | "top"
| "center"
| "bottom"
| "fill"
| "aspectFill"
| "fit"
| "left"
| "right"
| "topLeft"
| "topRight"
| "bottomLeft"
| "bottomRight"
The mode used to place and scale an image splash screen. Ignored for storyboard-based splash screens.
adamdbradley commented 3 years ago

Would you be able to separate these into different PRs? I like the multiline Type, and correct table headers, but we prefer to keep in the code blocks where we have them. Thanks