-
- Notifications
You must be signed in to change notification settings - Fork 5.8k
fix: the coverpage image display error #1514
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
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/docsify-core/docsify-preview/2T9dXDvB9KVK1CsYLPCoVSuJeR4L |
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 6997df8:
|
@sy-records How have we verified this fix? All of the screenshots appear to be on Chrome for Android. |
I used ios safari also recurred, so the fix was made. |
height 100% | ||
width 100% | ||
height 100vh | ||
width 100vw |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we do this, due to how vw
works, we need to verify that the page does not start scrolling sideways, because 100vw
does not account for scrollbar width. See this:
Can you add screenshots in this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added screenshots.
There are a few issues with the existing CSS and the changes in this PR.
I can't edit your PR nor can I comment on unmodified lines here on GitHub so I've copy/pasted the updated CSS (Stylus) below. I'm also happy to create a separate PR to address the issue if preferred. section.cover position relative align-items center background-position center center background-repeat no-repeat background-size cover min-height 100vh width 100% display none &.show display flex &.has-mask .mask background-color $color-bg opacity 0.8 position absolute top 0 bottom 0 width 100% .cover-main flex 1 margin -20px 16px 0 text-align center position: relative &:first-child margin-top 1em &:last-child margin-top 1em a color inherit text-decoration none &:hover text-decoration none p line-height 1.5rem margin 1em 0 h1 color inherit font-size 2.5rem font-weight 300 margin 0.625rem 0 2.5rem position relative text-align center a display block small bottom -0.4375rem font-size 1rem position absolute blockquote font-size 1.5rem text-align center ul line-height 1.8 list-style-type none margin 1em auto max-width 500px padding 0 .cover-main > p:last-child a border-color var(--theme-color, $color-primary) border-radius 2rem border-style solid border-width 1px box-sizing border-box color var(--theme-color, $color-primary) display inline-block font-size 1.05rem letter-spacing 0.1rem margin 0.5rem 1rem padding 0.75em 2rem text-decoration none transition all 0.15s ease &:last-child background-color var(--theme-color, $color-primary) color #fff &:hover color inherit opacity 0.8 &:hover color inherit blockquote > p > a border-bottom 2px solid var(--theme-color, $color-primary) transition color 0.3s &:hover color var(--theme-color, $color-primary) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #1514 (comment)
@jhildenbiddle You can submit a PR. |
Summary
fix #381 (comment)
What kind of change does this PR introduce? (check at least one)
If changing the UI of default theme, please provide the before/after screenshot:
Does this PR introduce a breaking change? (check one)
If yes, please describe the impact and migration path for existing applications:
The PR fulfills these requirements:
fix #xxx[,#xxx]
, where "xxx" is the issue number)You have tested in the following browsers: (Providing a detailed version will be better.)
If adding a new feature, the PR's description includes:
To avoid wasting your time, it's best to open a feature request issue first and wait for approval before working on it.
Screenshots
click