Block Styling Issues

Support MB Blocks Block Styling Issues

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #40149
    Metabox danMetabox dan
    Participant

    Please note my website is public but not 'LIVE yet', so no need to worry about any changes.

    I'm building my first Gutenberg block, using this tutorial, and I'm keeping it very simple, as it is my first block.

    My block text displays fine, but when I select a block variation, my CSS changes aren't being replicated.
    Herre is m test post I created for this test: https://citylogisticsgroup.co.uk/test-2/

    Custom Fields URL: https://citylogisticsgroup.co.uk/wp-admin/post.php?post=75&action=edit
    my field IDs are 'panel' and 'heading'
    this is my code:

    <div class="panel panel--{{ type }}" >
    {{ heading }}
    </div>

    <style>
    .panel {
    border: 1px solid grey;
    border-radius: 10px;
    padding: 14px 10px;
    }

    .panel--white {
    background-color: white;
    }

    .panel--blue {
    background-color: blue;
    }
    </style>

    Cheers! Dan

    #40156
    PeterPeter
    Moderator

    Hello Dan,

    Can you please export the field group to a JSON file and share it here? And please share some screenshots when you add the block in the admin area, I will test the code on my local site.

    Please read more on the documentation to know how to export a field group https://docs.metabox.io/extensions/meta-box-builder/#export--import

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.