Using main style.css with add_editor_style

by epsilon42   Last Updated September 13, 2017 05:08 AM

All the resources I've read online suggest using a different CSS file (i.e. editor-style.css) in order to style the WYSIWYG editor to better resemble what the actual content will look like.

For the purpose of testing I tried to just use the main style.css file that I've been using for the rest of the site and the styling in the WYSIWYG editor looks great and so far I haven't noticed any problems by doing this.

Should I still create a new editor-style.css and use that or is it acceptable practice to use my main style.css?

For reference, this is the code I used below:

function wysiwyg_styles() {
    add_editor_style( 'style.css' );
add_action( 'init', 'wysiwyg_styles' );

Related Questions

data-accordion removed in Visual Editor

Updated May 15, 2015 22:03 PM