Support » Theme: Twenty Twenty-One » 2021 Gallery Caption – figcaption

  • I’m having trouble fixing one teeny, very specific aspect of 2021

    The font for captions to images in gallery is much too small, but not adjustable.

    I appreciate that fixes are best tackled via child themes, but as I am not very familiar with CSS, I wanted to make sure that I am fixing the right bit of CSS, before introducing too many ways it might not work at once!
    I have downloaded the extra config update but it doesn’t offer changing font size in captions in gallery blocks

    The appropriate bit of code appears to be (line 2198)

    .wp-block-gallery .blocks-gallery-image figcaption,
    .wp-block-gallery .blocks-gallery-item figcaption {
    	margin: 0;
    	color: var(--global--color-white);
    	font-size: var(--global--font-size-md);

    (NB original was var(–global–font-size-xs)

    where global font sizes are defined from line 107.

    /* Font Size */
    	--global--font-size-base: 1.25rem;
    	--global--font-size-xs: 1rem;
    	--global--font-size-sm: 1.125rem;
    	--global--font-size-md: 1.25rem;
    	--global--font-size-lg: 1.5rem;
    	--global--font-size-xl: 2.25rem;
    	--global--font-size-xxl: 4rem;
    	--global--font-size-xxxl: 5rem;
    	--global--font-size-page-title: var(--global--font-size-xxl);
    	--global--letter-spacing: normal;

    This is from style.css from the 2021 theme in the subdomain where I am developing this site
    changing the font size attribute from xs to md has no effect

    Any pointers to what I am missing gratefully received. TIA

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Thread Starter willyv2


    Update: by “downloaded the extra config update” I meant I have installed the Plugin “Options for Twenty Twentytwo” from Webd, which gives additional customisations but not to the font size in gallery captions.

    I did try adding captions in columns below the gallery, but that didn’t display properly on mobile.

Viewing 1 replies (of 1 total)
  • The topic ‘2021 Gallery Caption – figcaption’ is closed to new replies.