Skip to content
This repository has been archived by the owner on Dec 2, 2020. It is now read-only.

Reduce gallery caption size #417

Merged
merged 3 commits into from
Oct 12, 2020
Merged

Reduce gallery caption size #417

merged 3 commits into from
Oct 12, 2020

Conversation

JustinyAhin
Copy link
Member

Fixes #238

Summary

Reduce size of gallery caption.

Relevant technical choices:

No

Test instructions

This PR can be tested by following these steps:

  1. Add a gallery block to a post or page
  2. Add a caption to the image
  3. Select one of the link options in the block sidebar
  4. Set the gallery so that the images are fairly small
  5. For galleries that have three column and more the font size of the caption is now defined to --global--font-size-xxs which value is 0.75rem.

Quality assurance

  • I have thought about any security implications this code might add.
  • I have checked that this code doesn't impact performance (greatly).
  • I have tested this code to the best of my abilities
  • I have checked that this code does not affect the accessibility negatively

Copy link
Collaborator

@kjellr kjellr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little confused why this PR includes two size rules, and introduces a new font size variable. Can you explain the reasoning there? From the issue, it sounds like the caption size should just be changed to --global--font-size-xs, which is an existing variable.

Also — when changing the font size here, be sure to change it in the editor styles as well.

@melchoyce
Copy link
Contributor

From the issue, it sounds like the caption size should just be changed to --global--font-size-xs, which is an existing variable.

Yes, we should go with this instead of introducing anything new.

@JustinyAhin
Copy link
Member Author

@kjellr @melchoyce I introduced the new font size because with --global--font-size-xs which is 1rem, the caption still covers all the image.

@aristath mentionned to me that a size under 16px could introduce accessibility issues. So I reverted and use the --global--font-size-xs.

Copy link
Collaborator

@kjellr kjellr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I think this works fine for now. 👍

@kjellr kjellr merged commit e4e8d64 into WordPress:trunk Oct 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gallery block: Small gallery images with captions and links are not clickable
3 participants