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

Lightbox: Theme styles are applied to the button element #54940

Closed
t-hamano opened this issue Sep 29, 2023 · 4 comments
Closed

Lightbox: Theme styles are applied to the button element #54940

t-hamano opened this issue Sep 29, 2023 · 4 comments
Assignees
Labels
Backwards Compatibility Issues or PRs that impact backwards compatability [Block] Image Affects the Image Block [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@t-hamano
Copy link
Contributor

Description

Enabling Lightbox on an image block adds a button element to click on the image and an element to close the Lightbox.

Many themes, especially classic themes, apply styles to the button element, which causes unintended styles to be applied to the two buttons in the Lightbox.

Below is examples:

  • Twenty Twenty One:
    • If you do not hover over the image, the image will be covered in dark blue
    • Close lightbox button has black background
  • Twenty Nineteen:
    • The image turns black when you hover the mouse over it
    • Close lightbox button has black background

I think we need a minimal style to override the theme's styles.

Step-by-step reproduction instructions

N/A

Screenshots, screen recording, code snippet

Note: Warning messages displayed in screencasts are reported with #54930.

e4964c058c8b00cd3bdebd9d9b8c3377.mp4

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@t-hamano t-hamano added Backwards Compatibility Issues or PRs that impact backwards compatability [Block] Image Affects the Image Block [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. labels Sep 29, 2023
@swissspidy swissspidy added the [Type] Bug An existing feature does not function as intended label Oct 2, 2023
@annezazu annezazu moved this to Needs Dev / Todo in WordPress 6.4 Editor Tasks Oct 2, 2023
@annezazu
Copy link
Contributor

annezazu commented Oct 2, 2023

@artemiomorales can you dive into this? Adding to the 6.4 board.

@artemiomorales artemiomorales added the [Status] In Progress Tracking issues with work in progress label Oct 3, 2023
@artemiomorales artemiomorales self-assigned this Oct 3, 2023
@artemiomorales
Copy link
Contributor

This is related to #54682, because the close button color is not being read or determined properly in classic themes. I've begun adding a fix in the linked PR.

@OlaIola
Copy link

OlaIola commented Oct 7, 2023

Related Core ticket: https://core.trac.wordpress.org/ticket/59513

@artemiomorales artemiomorales moved this to Development Feedback in Image Lightbox Oct 11, 2023
@artemiomorales
Copy link
Contributor

This is a duplicate of #54682 — I'll close this issue so we can consolidate conversation on just one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backwards Compatibility Issues or PRs that impact backwards compatability [Block] Image Affects the Image Block [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
No open projects
Status: Done
Status: Done
Development

No branches or pull requests

5 participants