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

After setting the background image, the button is obscured #1233

Closed
1 task
sy-records opened this issue Jun 20, 2020 · 4 comments · Fixed by #1234
Closed
1 task

After setting the background image, the button is obscured #1233

sy-records opened this issue Jun 20, 2020 · 4 comments · Fixed by #1234
Labels
bug confirmed as a bug regression

Comments

@sy-records
Copy link
Member

sy-records commented Jun 20, 2020

Bug Report

Steps to reproduce

After setting the background image, the button is obscured, Because of this PR #1215

image

hello, @mohammedsahl Can you fix it if you have time?

https://docsify.js.org/#/cover?id=custom-background

What is current behaviour

What is the expected behaviour

Other relevant information

  • Bug does still occur when all/other plugins are disabled?

  • Your OS:

  • Node.js version:

  • npm/yarn version:

  • Browser version:

  • Docsify version: v4.11.4

  • Docsify plugins:

Please create a reproducible sandbox

Edit 307qqv236

Mention the docsify version in which this bug was not present (if any)

@sy-records sy-records changed the title Set the background image to be obscured The background image is obscured. Jun 20, 2020
@sy-records sy-records changed the title The background image is obscured. After setting the background image, the button is obscured Jun 20, 2020
@mohammedsahl
Copy link
Contributor

Sure thing! I'll have a look soon 😊

@jhildenbiddle
Copy link
Member

Good catch, @sy-records.

The coverpage content is being obscured by the <div class="mask"> element. This is happening because the mask is rendered after the coverpage content, which places it above the coverpage content in the natural stacking order. This can be circumvented by manually setting z-index values (as was done previously), but this isn't necessary if elements are just rendered in the correct order to begin with.

The easiest way to fix this issue is to render the <div class="mask"> before the <div class="cover-main"> element and add the following declaration to .cover-main ruleset in _coverpage.style:

position: relative;

FWIW, there are better ways to handle masks. For now, the above fix is a minimal change that avoids breaking third-party themes and custom CSS that targets the .mask element:

/* Change mask color */
.mask {
  background: rgba(0, 0, 0, 0.7);
}

/* Disable mask */
.mask {
  display: none;
}

@trusktr
Copy link
Member

trusktr commented Jun 21, 2020

@jhildenbiddle Would you like to make that a PR?

@jhildenbiddle
Copy link
Member

@trusktr --

I added the following to #1212:

I'll break that list into separate PRs once we get rolling on v5. For now, I'm trying to keep the issue "noise" down to a minimum while I'm preparing to triage all of the existing issues.

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

Successfully merging a pull request may close this issue.

5 participants