Why is the page content width 688px? #1646
Replies: 4 comments 9 replies
-
First, the numbers are always even numbers because of my preference. The largest breakpoint is at 1440px. When window hits this width, the whole layout gets fixed. At this point, we want 32px padding on let and right side of window. So, the actual max width for content is 1440 - 32 - 32 = 1376. From here, we have Sidebar which is 240px. That makes 1376 - 240 = 1136. So, the main doc content area is 1136px now. And we have Aside section (Table of contents and such) which is 224px. So the remaining doc body area is 1136 - 224 = 912px. And then I wanted to have the same padding for left and right of the doc body, so that have the same distance to sidebar and aside. And that is max 112px. So, 912 - 112 - 112 = 688. |
Beta Was this translation helpful? Give feedback.
-
was thinking to open a new discussion, but let me add it rather here. Did you see that the page width is changing when you switch from short page (no page scroll on the right) to long page (with scrolls) |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Continue this topic, I tried to modify the display area of the vitepress, because I have a 4K resolution (3840 × 2160) display, and the default vitepress display method greatly wastes the space layout, so I tried to modify it without destroying the original, as shown in the following link: https://bddxg.top/article/project-init/%E8%84%9A%E6%89%8B%E6%9E%B6/Vite%E7%AC%94%E8%AE%B0.html |
Beta Was this translation helpful? Give feedback.
-
I'm taking a look at some css specs and noticed that the width of VitePress content is 688 px.
This default content width seemed quite random to me.
Is there a "design secret" reason for using 688 specifically?
versus like 650, 675 or 700?
Beta Was this translation helpful? Give feedback.
All reactions