• I’m attempting to replace a site theme with a Twenty Twenty-Three child theme, and I’m finding that the theme editor seems to be limiting a lot of my capabilities. Rather than ask a whole bunch of questions at once, I’ll start with custom length units. The site editor has different length unit options for different block types, limiting the sizing options for many block types far more than is necessary.

    I found a wp.org tutorial page for adding custom units to the block editor, but creating a functions.php with “custom-units” doesn’t seem to work for the site editor. I also found where to add custom units to the “spacing” section of theme.json (e.g. I added vmin and vmax). I can change the pre-named “fontSizes,” but “customFontSize” is a boolean, with no units options.

    Can I, by editing theme.json, creating a functions.php file, or changing anything else, make the theme editor more flexible? Is there a resource that’ll help me with the various additional options that I could add?

    • This topic was modified 1 year, 2 months ago by Erik Harris. Reason: clarifying, updating

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Adding more units is still an open issue with the Gutenberg team: https://github.com/WordPress/gutenberg/issues/47863

    The function you found in the documentation is used to remove units, if I understood correctly there.

    With the documentation, you have already found the right source for information on influencing the editor.

    If you have any requests for additions, I would recommend that you submit them to the Gutenberg team: https://github.com/WordPress/gutenberg/issues

    Thread Starter Erik Harris

    (@eharris)

    Thanks for your suggestion, @threadi . I created a ticket for font sizes, including two proposed solution ideas within theme.json. I may do something similar for various other issues I’m finding with the theme/site editor (e.g. the colors specified for links in my 2023 child theme are completely ignored, with the “secondary” color being used instead; custom CSS isn’t displayed in the visual editor; and for text case options, the really-obvious option of “smallcaps” is missing, though I don’t use it on this site, so it doesn’t affect me).

    I really like where the theme editor is going, but right now, it seems terribly limited. Most of what I want to do needs to be done by hacking theme.json or custom CSS, and I’m hardly playing with advanced concepts.

    • This reply was modified 1 year, 2 months ago by Erik Harris.
    • This reply was modified 1 year, 2 months ago by Erik Harris.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Editing the Site Editor? Can I add more unit options?’ is closed to new replies.