-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Image Block retains rounded style within Lightbox #67535
Comments
Hello @relic-se, Thank you for raising this issue and sharing your thoughts! If I understand correctly, you’re suggesting that images in the Lightbox should display in their normal (unrounded) style, instead of inheriting the "Rounded" style from the block. Is that right? This is a good point, as Lightbox images are usually expected to show their original form. We could consider adding a toggle in the block settings to let users choose whether Lightbox should inherit the block’s styles or use a default look. Let me know if this idea works, or if there are other suggestions we can explore! 😊 |
Hi @Mayank-Tripathi32! After talking it over a bit, I think that a toggle would be the optimal route. It could also be a setting defined within the block-level lightbox theme.json settings. Lines 276 to 279 in 5b286b7
|
Hey @relic-se, I will work on adding the toggle in a quick demo in the morning. Look forward to it and review. Thanks! |
Hey @relic-se, demo.mp4Let me know if this look like viable solution! Thanks block.json
"lightbox": {
"type": "object",
"enabled": {
"type": "boolean"
},
"applyStyles": {
"type": "boolean",
"default": "true"
}
}, |
Kindly review the code as well. I have updated the attributes in block.json to achieve this. |
Wow, great work! That's a clean implementation that I think addresses the problem very well. I am not incredibly well-versed in the Gutenberg codebase, so someone else with a better understanding should definitely take a closer look. Still, I'll let you know if I see anything awry. |
Description
I expect for the full image to be visible when opened within the Lightbox modal. The "Rounded" style should only apply within the site blocks, not within the Lightbox.
I understand that this is likely a preference that is dependent on the scenario and is up for debate. I'd like to bring it up as a discussion point at the least to assess a potential solution.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
Environment info
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.
The text was updated successfully, but these errors were encountered: