• Hi, I’ve created a ‘card’ style content with Kadence blocks Row and Header. I’ve set some custom style on blocks settings. I’m using that card in a loop with dynamic content. They frontend page output displays a lot of cards.

    I notice that Kadence Blocks duplciate the css <style> of the card for each displayed card. This is the duplicated CSS:

    <style id=”kt-blocks_c731b4-ee”>#kt-layout-id_c731b4-ee{border-color:#f4f4f4;border-top-width:2px;border-right-width:2px;border-bottom-width:2px;border-left-width:2px;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:4px;border-bottom-left-radius:4px;overflow:hidden;}#kt-layout-id_c731b4-ee > .kt-row-column-wrap{padding-top:0px;padding-bottom:0px;padding-left:0px;padding-right:0px;}</style>

    Is it possible to optimize it in some way? How can I set those styles just 1 time for all the displayed cards?

    thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • hannah

    (@hannahritner)

    Hey,
    Thanks for reaching out! I’ll pass this along to the developer and see what insight he has.
    Thanks for your patience!

    Kindly,
    Hannah

    Plugin Contributor Ben Ritner – Kadence WP

    (@britner)

    Hey,
    Right now there is not any built-in way to optimize this. But it’s something we have in our radar. Logistically each block is its own block with no relationship to others to know that specific styles might already be output and because each block can be styled separately, they each will output their own custom styles.

    We are considering some kind of global style system where you can create a block style and then apply it to other blocks by connecting it to a global style.

    Unfortunately, we don’t have a timeline for this at the moment.

    Ben

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

The topic ‘Optimize duplicated CSS’ is closed to new replies.