• Resolved dorf

    (@dorf)


    The WordPress Gutenberg image block will add classes “size-large”, “size-full” based on the resolution chosen. How can I disable these Tailwind classes? Or disable the image block from adding them.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Sua

    (@suabahasa)

    Hi @dorf, I couldn’t find a workaround for this case except enabling the prefix on TW configuration.

    You may want to check the Tailwind official docs https://tailwindcss.com/docs, and you can update here if you find something

    Thread Starter dorf

    (@dorf)

    This plugin fills a nice gap, so I’ll keep using it and write you any solutions I come up with.

    At the moment adding to the site css .size-full {max-height:fit-content} mitigates the damage.

    Maybe doing something with custom utilities is the fix, I’ll try and let you know. https://tailwindcss.com/docs/adding-custom-styles#adding-custom-utilities

    Keep doing a good job.

    Thread Starter dorf

    (@dorf)

    A quick and easy way to mitigate the conflict is to add an @layer utilities
    Maybe have a snippet in your https://wind.press/docs/configuration/file-main-css

    @layer theme, base, components, utilities;

    @import "tailwindcss/theme.css" layer(theme) theme(static);

    /* @import "tailwindcss/preflight.css" layer(base); */

    @import "tailwindcss/utilities.css" layer(utilities);

    @layer utilities {

    figure.size-large {

    width: unset !important;

    height: unset !important;

    }

    .size-full {

    max-height: fit-content;

    }

    }

    @config "./tailwind.config.js";
    Plugin Author Sua

    (@suabahasa)

    Hi @dorf,

    Thanks for sharing the workaround.

    For now, I mark this as resolved. You could reply or open a new Topic later.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Conflict with WordPress classes’ is closed to new replies.