Restore `max-width` to `100%` if viewport is less than 768px by yzhang-gh ยท Pull Request #1273 ยท docsifyjs/docsify

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.