WordPress.org

Make WordPress Core

Opened 9 months ago

Closed 3 months ago

#46173 closed defect (bug) (maybelater)

TinyMCE: Improve styling for the Classic Block

Reported by: azaozz Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.0
Component: TinyMCE Keywords: has-patch early
Focuses: Cc:
PR Number:

Description

Currently we use wp-includes/css/editor.css to override some of the styling for the TinyMCE UI to make it consistent with the styling on the (old) Edit Post screen, and to style the "Advanced Link" modal.

Then, as the styling of the Block Editor is considerably different, we override the overrides to style the Classic Block toolbars. That is a left-over from the Gutenberg plugin where it needed to override core's styles and brings some visual bugs/inconsistencies. Now we can change editor.css to apply styles only where needed.

Attachments (1)

46173.patch (73.7 KB) - added by azaozz 7 months ago.

Download all attachments as: .zip

Change History (6)

#1 @azaozz
9 months ago

As far as I see best would be to split editor.css into several parts:

@azaozz
7 months ago

#2 @azaozz
7 months ago

In 46173.patch:

  • First run :)
  • Split editor.css into classic-editor.css, wplink.css and tinymce-icons-override.css.
  • Add an editor-buttons "group" to script-loader for back-compat.
  • Add a param to wp_enqueue_editor() and _WP_Editors::enqueue_default_editor() to distinguish which editor is being loaded, 'classic" or 'block'.

This is the first half of the patch. The second needs to go in the classic block scss, and both have to be added at the same time to core to avoid breaking the classic block's styling.

This ticket was mentioned in Slack in #core by audrasjb. View the logs.


6 months ago

#4 @audrasjb
6 months ago

  • Keywords has-patch early added
  • Milestone changed from 5.2 to 5.3

As per today's bug scrub, we are going to move this one to the next Release since beta 3 and RC are approaching.
Adding early keyword too, since this one will need some coordination :-)

#5 @azaozz
3 months ago

  • Milestone 5.3 deleted
  • Resolution set to maybelater
  • Status changed from new to closed

Looking at this again, it's a good idea but maybe should be done once the old Edit Post screen in fully deprecated. Then we can clearly separate the old editor styling as it will be only for plugins and the Classic block.

Closing as maybelater for now. Feel free to reopen with other ideas (and a patch?).

Note: See TracTickets for help on using tickets.