Cannot customize max-height css property for image in lightbox #233
-
|
Tried to do this (in styled-component): .lightbox :global(.yarl__slide_image) {
max-height: 86%;
}that do nothing. The goal is to left more space above and below image to show centered titles and captures to not overlay with it. Have not found another solution. Any help, please. What am I doing wrong? |
Beta Was this translation helpful? Give feedback.
Answered by
igordanchenko
Jan 29, 2024
Replies: 1 comment 1 reply
-
|
You can increase the padding around each slide with the following setting: carousel={{ padding: 64 }}but that increases padding on all 4 sides, not just on the vertical axis. You can also override the inline style rendered by the library with .yarl__slide_image {
max-height: 86% !important;
}Please let me know if the above addresses your use case. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
jimdigrease
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can increase the padding around each slide with the following setting:
but that increases padding on all 4 sides, not just on the vertical axis.
You can also override the inline style rendered by the library with
!important:Please let me know if the above addresses your use case.