I recently flipped back to earlier articles and found many issues—either too many blank lines that hurt readability or text that looks odd on mobile because it's too large; there are also font problems: some fonts aren't available on Apple devices, making the display ugly. So I want to standardize the format to avoid messy layouts in the future.
Fonts
Prefer Microsoft YaHei; on Apple devices, prefer the system font -apple-system. Helvetica, Roboto, Noto, Arial, sans-serif serve as fallbacks.
Layout Rules
An article should use no more than three text colors.
Keep a 20 px margin from left and right borders; full-width text feels oppressive.
Set body line height to 33 px.
Do not indent the first line of each paragraph; on long phones, indentation makes paragraphs look uneven and unnecessary.
h1: 2.2 em; h2: 1.5 em; h3: 1.3 em; h4: 1.15 em; h5: 1 em; h6: 0.9 em.
Body text: 15 px. Light mode color: rgba(0,0,0,0.7); dark mode color: #d9d9d9.
Text Rules
Add a space between linked and non-linked text.
Write clearly and unambiguously; use correct grammar, no typos, correct spelling.
Insert a space between Chinese and English or Chinese and numbers—it looks much better.
Capitalize proper English terms correctly, e.g., Font Awesome, not Fontawesome.
Images
- Compress every referenced image to improve browsing; except when clarity is required, keep each image under 200 KB.
Others
- All articles are licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.