Support » Fixing WordPress » Styling blocks using theme.json

  • I have an hybrid theme and I want to style blocks using the theme.json file instead of pure CSS. These are my code block CSS styles:

    .wp-block-code {
        background-color: transparent;
        font-family: Menlo, Consolas, Monaco, monospace;
        font-size: 0.8125rem;
        line-height: 1.5;
        margin-bottom: 1.6em;
        max-width: 100%;
        overflow: auto;
        padding: 1.6em;
    }

    I know how to migrate the background-color, font-family, font-size, line-height, margin-bottom and padding CSS properties to theme.json properties, but what about max-width and overflow? Should these be kept in the CSS file?

    Thanks in advance

    • This topic was modified 1 month, 2 weeks ago by leemon.
    • This topic was modified 1 month, 2 weeks ago by leemon.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.