Comments (1)
Thanks for filing the issue, @cippaciong.
TL;DR: We can address readability concerns and personal line-length preferences by doing the following:
- Set the default line length (or "measure") of the markdown area to a font-size relative value that strikes a balance between readability best practices (no more than 80 characters) and aesthetics. After doing a bit of research, this looks to be between 80-95 characters per line which results in a markdown container width of roughly 700px +/- 20px.
- Allow the markdown container's width to be configurable by site maintainers. This allows sites maintainers and theme authors using a different font to adjust the maximum width as needed to adhere to the "no more than 80 character" line length recommendation.
Details (for those who care)...
Some people will inevitably feel that the new markdown container width looks/feels too narrow. The criticism isn't necessarily wrong. All of the Docsify alternatives I tested have line lengths greater than 80 (see below). Every one of those alternatives also renders both left and right sidebars which help fill the horizontal space. Docsify, by comparison, will have a narrower overall content width which some people may not care for. There are a few additional things we can do to try and reduce (but not eliminate) these concerns:
-
Increase the default font size in Docsify's default themes to 16px. Larger font sizes requires a wider markdown container to fit the same number of characters per line. Consider how font size affects the markdown container size when using Source Sans Pro (the web font used in Docsify's
vue.css
theme):Source Sans Pro (used in vue.css)
- 80 characters @ 16px = 550px container
- 80 characters @ 15px = 515px container
- 80 characters @ 14px = 470px container
-
Consider alternative fonts that are more visually appealing (wider) at the desired line length. Consider how switching to San Francisco (the default sans-serif font on macOS) affects the markdown container size compared to Source Sans Pro (above):
San Francisco (macOS)
- 80 characters @ 16px = 590px container
- 80 characters @ 15px = 550px container
- 80 characters @ 14px = 520px container
For comparison, here are the default line length, font size, and content container width values from a few Docsify alternatives:
- Docusaurus: 129 characters @ 16px = 958px
- GitBook: 109 characters @ 16px = 768px
- Starlight: 94 characters @ 16px = 720px
- VitePress: 90 characters @ 16px = 688px
Finally, here are the line lengths using Docsify's vue.css
theme and the previous max-width value of 800px
:
Source Sans Pro (used in vue.css)
- 16px = 117 characters
- 15px = 125 characters
- 14px = 133 characters
Based on these numbers, reverting the max-width to 800px
(#1017) is not our best option. I think the best option is a font-relative max-width value that falls somewhere between 80-90 characters per line @ 16px.
from docsify.
Related Issues (20)
- Can the search box be placed in the middle and what should be done HOT 1
- Bug
- Visually display customizable search keyboard shortcut to user HOT 1
- Enable pre/post processing on coverpage and sidebar HOT 4
- Search file configuration HOT 1
- keyboard focus is not visible on the settings dropdown and checkboxes present in the setting dropdown. HOT 1
- After invoking 'QuickStart' link from the left pane, the focus is getting lost. HOT 4
- missed to copy files in docker image when building Dockerfile HOT 2
- Embedding a file in a sidebar is invalid HOT 1
- Second-level table UI HOT 6
- Enhancement: Move emoji short code to separate plugin HOT 9
- Update or remove outdated / abandoned documentation translations HOT 26
- Workflow: Setup a daily sync scheduler to sync emoji data instead of run in every build
- Search results are not announced in type doc search edit field. HOT 1
- Scan code base for silenced errors. HOT 1
- How to implement features that the plugin doesn't have HOT 1
- When the `onlyCover` configuration option is set to `true` in the test case, the test will always time out. HOT 1
- Keep heading selectable and use seperate element to link target HOT 2
- Highlight the word result that searched HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docsify.