jeffreyvr/tailpress

.wp-caption-text font size=0

pixeline opened this issue · 0 comments

the generated style for .wp-caption-text makes it invisible.

.wp-caption-text {
    font-size: 0;
    color: #4b5563;
}

I think it boils down to tailwindcss-tailpress library, which expects a "sm" size, or perhaps it should be fontSizes (plural) ?

const imageCaptions = {
        '.wp-caption': {
            "@apply inline-block": {},
            '& img': {
                marginBottom: margin[2] || '0.5rem',
                "@apply leading-none": {}
            },
        },
        '.wp-caption-text': {
            fontSize: (fontSize.sm && fontSize.sm[0]) || '0.9rem',
            color: (colors.gray && colors.gray[600]) || '#718096',
        },
    };

It does not seem to pickup my theme.json typography.fontsizes array values.

To be honest, I would suggest to entirely remove this imageCaptions utility: I'd rather tweak it using good old css.