1

I needed to make some CSS changes to my WordPress site (child theme) earlier and opened the WordPress editor inside "Appearance":

Appearance > Editor > someCssFile.css 

Inside the editor page, there's a notice on top of the page that says:

Did you know?

There’s no need to change your CSS here — you can edit and live preview CSS changes in the built-in CSS editor.


Other than the live preview feature, are there any other kind of differences (performance or otherwise) between the customizer "built-in CSS editor" and the WordPress code editor that is available in Appearance?

    1 Answer 1

    3

    Here is a warning that also displays when you go into Appearance > Editor. This message appears regardless of using a child theme or not (at least in WP 5.0 +)

    You appear to be making direct edits to your theme in the WordPress dashboard. We recommend that you don’t! Editing your theme directly could break your site and your changes may be lost in future updates. If you need to tweak more than your theme’s CSS, you might want to try making a child theme.

    If you decide to go ahead with direct edits anyway, use a file manager to create a copy with a new name and hang on to the original. That way, you can re-enable a functional version if something goes wrong.

    The only difference in performance, (which in cases of adding a little CSS is less than minimal) that I can think of is when using Appearance > Editor you are actually editing a real CSS file, so your styles will get added directly into that file. When you use Appearance > Customize > Additional CSS the orginal stylesheet isn't effected. It creates a style tag within the head section with your styles in it.

    Since you already have a child theme, I would say that editing the CSS file directly is the way to go (Appearance > Editor). There is no need to add extra styles to the head section. Plus it will keep all of your styles in 1 spot making it easier to manage.

    3
    • I am using a child theme so I didn't get that notice. And since customizer directly add styles to the head section and has lesser performance, the editor in Appearance would be a better way of editing css?
      – AndrewL64
      CommentedJan 23, 2019 at 18:41
    • I have edited the question to mention that I'm using a child theme.
      – AndrewL64
      CommentedJan 23, 2019 at 18:43
    • Can you please update the answer with the above info instead of the child theme info and I'll accept this answer. And thanks for the clarification mate. Cheers.
      – AndrewL64
      CommentedJan 23, 2019 at 18:55

    Start asking to get answers

    Find the answer to your question by asking.

    Ask question

    Explore related questions

    See similar questions with these tags.