Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore max-width to 100% if viewport is less than 768px #1273

Closed
wants to merge 3 commits into from
Closed

Restore max-width to 100% if viewport is less than 768px #1273

wants to merge 3 commits into from

Conversation

yzhang-gh
Copy link

@yzhang-gh yzhang-gh commented Jul 6, 2020

Summary

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Build-related changes
  • Other, please describe:

If changing the UI of default theme, please provide the before/after screenshot:

👇👇👇

It is just to fix a regression introduced by #1017. Before, the .markdown-section has max-width: 800px, which means its margin-left/right can be 0 if the viewport is narrow (e.g. on mobile devices). But with max-width: 80%, there is always 20%-wide space no matter how wide the screen is.

This PR restores the max-width to 100% under condition

@media screen and (max-width: 768px)

👆👆👆

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)

You have tested in the following browsers: (Providing a detailed version will be better.)

  • Chrome
  • Firefox
  • Safari
  • Edge
  • IE

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature
  • Related documents have been updated
  • Related tests have been updated

To avoid wasting your time, it's best to open a feature request issue first and wait for approval before working on it.

Other information:


  • DO NOT include files inside lib directory.

@vercel
Copy link

vercel bot commented Jul 6, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/docsify-core/docsify-preview/jyri5i68q
✅ Preview: https://docsify-preview-git-fork-yzhang-gh-patch-1.docsify-core.vercel.app

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 6, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit e3e215e:

Sandbox Source
docsify-template Configuration

@sy-records
Copy link
Member

I thought the original was better.

image

image

@yzhang-gh
Copy link
Author

yzhang-gh commented Jul 17, 2020

Well, maybe we need to collect more feedback 🤔.

Personally, I think 20% margin is too much for mobile devices. Probably we can see what other docs generators do.

Vuepress

image

(We already have 15px padding for .markdown-section, so extra margin is not needed)

@sy-records
Copy link
Member

Yes, everyone's needs are different, but all can be customised using css

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants