Editor styles based on post type is not picking up by wp-admin

I got a question for which I can’t find an answer anywhere on the internet.
In my theme’s after_setup_theme action I have added the following lines to tweak the editor style a little bit:

add_theme_support( 'editor-styles' );
add_editor_style( 'assets/css/block-editor/editor-style.css' );

Now the crazy thing is that in that CSS file in I add like:

.wp-block {
  max-width: 726px;
}

That works fine and I can see that happening. But if I try to do conditional styling based on post type like this:

body.post-type-page .editor-styles-wrapper .wp-block,
body.post-type-notices .editor-styles-wrapper .wp-block {
  max-width: 1100px;
}
body.post-type-post .editor-styles-wrapper .wp-block {
  max-width: 726px;
}

This does not work. I don’t know why. WP Admin Simply doesn’t pick up the conditional style beside setting up global style. Does anyone know how can I do conditional styling in the editor-style.css?



Source link