Thursday, January 12, 2023
HomeWordPress Developmentfull website enhancing - How can I disable fontSizes of the Paragraph...

full website enhancing – How can I disable fontSizes of the Paragraph block contained in the Quote block with theme.json?


I am utilizing theme.json.

I am specifying fontSizes for the Paragraph block in addition to the Quote block in theme.json:

  "settings": {
    "blocks": {
      "core/paragraph": {
        "typography": {
          "fontSizes": [
            {
              "slug": "small",
              "size": "0.875rem",
              "name": "Small"
            },
            {
              "slug": "regular",
              "size": "1rem",
              "name": "Regular"
            },
            {
              "slug": "large",
              "size": "1.25rem",
              "name": "Large"
            }
          ]
        }
      },
      "core/quote": {
        "typography": {
          "fontSizes": [
            {
              "slug": "large",
              "size": "1.25rem",
              "name": "Large"
            },
            {
              "slug": "huge",
              "size": "1.75rem",
              "name": "Huge"
            }
          ]
        }
      }
    }
  }

Earlier than 6.1 when the content material creator clicked the Quote block, they have been supplied with choices for my customized fontSizes for the Quote block. After 6.1 the Quote block now makes use of a Paragraph block within it, the result’s that when content material authors choose the quote (the Paragraph block) within the Quote block, they’re as an alternative supplied with my customized fontSizes for the Paragraph block.

Is there a solution to disable my customized fontSizes for the Paragraph block solely when it’s used within the Quote block?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments