• Resolved laslooo

    (@laslooo)


    I used the plugin to minify my css.

    Before most of my css was in a file called main.css. Now a css file called main.min.css is being used by my site. Inside there is all the minified CSS without spaces etc. I need to make some changes to the CSS. If I change the original file, nothing changes, I need to edit main.min.css now (editing a minified css file is damn hard).

    How does autooptimize affect the creation of these min.css files and whats the best way to edit my CSS, without editing a minified file?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    How does autooptimize affect the creation of these min.css files

    It’s not affecting the creation of main.min.css or similar at all actually. what AO does is collect all CSS (and JS) from your HTML and putting it in autoptimize_xyz123.css or .js files.

    whats the best way to edit my CSS, without editing a minified file?

    you should never need to edit the autoptimize_xyz123.css files, as AO will pick up changes in the original files and adapt automatically.

    to avoid making changes to main.css (which has no impact) or to main.min.css (which indeed is hard), both of which would get overwritten when doing plugin or theme updates, you could add your own custom CSS using WordPress’ “additional CSS” in Appearance -> Customize -> Additional CSS? This too will get picked up by AO (if you have the option “also aggregate inline CSS” on).

    hope this helps,
    frank

    Thread Starter laslooo

    (@laslooo)

    Hi Frank,

    thanks for your advice. It definitely helps. If I add custom CSS this way or via a child theme it won’t override the things in my main.min.css I need to change, so I don’t really have another option unfortunately . But thanks anyways.

    Cheers

    • This reply was modified 8 years, 11 months ago by laslooo.
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘How to edit minified CSS’ is closed to new replies.