Move the Customizer's Additional CSS
WordPress's Additional CSS box (Appearance → Customize → Additional CSS) is handy, but it belongs to one theme and has no history, conditions or organisation. Snipfire can move it into a CSS snippet.
Steps
- Snipfire → Snippets → Import, then pick Customizer "Additional CSS".
- Import it. It arrives as a CSS snippet called Additional CSS (theme name), switched off, in Imported/Customizer.
- Click Switch over.
Command line: wp snipfire import-from customizer-css --switch.
What happens
- The active theme's Additional CSS becomes a CSS snippet on Front end, with the note Imported from Appearance > Customize > Additional CSS.
- It gets Priority 999, so it loads after other stylesheets and still overrides the theme, as the Customizer CSS did.
- Switch over empties the Additional CSS box and switches the snippet on. Nothing is lost: WordPress keeps a revision of the Additional CSS, and Snipfire keeps its own backup.
- Switch over before you change themes: if the theme changes between importing and switching over, you'll see That theme is no longer active. and the old theme's box is left alone.
Why move it
- The CSS no longer disappears when you switch themes.
- You get history, conditions and the option to split it into several snippets.
- With Snipfire Pro, you can turn it into SCSS.
If you want the CSS to show in the block editor too, change Where to Front end and block editor.
Something unclear or missing? Tell us