• I just discovered a weird issue in WP 6.4.

    There is CSS for editor styles (editor.min.css): –wp–preset–font-size–normal: 16px; –wp–preset–font-size–huge: 42px; These properties are overwriting my font sizes from theme.json with slugs “normal” and “huge.”

    These properties weren’t there in WordPress 6.3!

    Because of that, in the Editor blocks with these properties are displaying with incorrect font sizes taken from these properties.

    For example, my font size style with the slug “normal” is 24px. However, because of these properties in editor.min.css the block with “normal” font-size becomes 16px. The same issue occurs with the “huge” font-size… However, in the frontend, everything is okay.

    Because of this, I can’t update my Papanek theme to version 6.4, as everything breaks in the Site Editor. It is also already broken on every website with Papanek that has the latest WordPress.

    Why are these properties there? Maybe it’s a mistake?

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Are the changes on both and back end. Usually css marked editor only apply to the back end. There are styles listed for both the blocks on the front and back end. Usually the front end styles are applied to the front and backend and the editor styles are applied only to the editor. The styles could be coming from the Gutenberg block. In the react setup there is a a folder for styles that applied to the block. You can enqueue a style for the editor. This would happen in the functions.php file using the add_editor_style function. The style sheet could be placed any where in the theme but most common places is in the theme directory. When you look in the inspector in the styles, There should be a line that tells you the location of the style that effecting your theme. There also could be an global value set for this. Look under your global setting and make sure there hasn’t been any values set. Keep in mind that any changes made to your theme after it loaded will be saved to the database and not the file. To see the changes you would have to export the theme. If you moved your site without doing an export. The changes would not show up in your current theme unless you moved your database content. It probably a good practice to export the theme after you get it where you want it. Updating your theme shouldn’t have any bad effects.

    • This reply was modified 1 year, 4 months ago by mrtom414.
    Thread Starter Roman Fink

    (@romanfink)

    Thanks for the answer. These styles are directly written in editor.min.css in WordPress 6.4+.

    I temporarily solved this problem by rewriting styles in the editor with the add_editor_style function. However, it seems like a bug because in older WordPress versions, these styles did not exist.

    I have created a topic here: https://github.com/WordPress/gutenberg/issues/56293

    So, I suppose this topic can be closed

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘New CSS properties in editor.min.css are overwriting font sizes from theme.json’ is closed to new replies.