Title: Child Theme &#8211; CSS Compression error
Last modified: August 30, 2016

---

# Child Theme – CSS Compression error

 *  Resolved [pixelmort](https://wordpress.org/support/users/pixelmort/)
 * (@pixelmort)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/child-theme-css-compression-error/)
 * Hi Frank,
 * I enqueued my own CSS in a child theme functions.php. Everything works fine untill
   I switch on the CSS compression with Autoptimize plugin.
    The front page is blank
   and a message display with “connection error”. Usually I never encounter any 
   issue ¯\_(ツ)_/¯
 * So, my question is: Does the wp_enqueue_style child theme function requiered 
   a specific information for rolling peacefully with the CSS compression?
 * Here an excerpt of my functions.php.
 *     ```
       function oxy_load_child_scripts() {
         wp_enqueue_style( THEME_SHORT . '-child-theme' , get_stylesheet_directory_uri() . '/style.css', array( THEME_SHORT . '-theme' ), false, 'all' );   
   
         // MY STYLE
           if ( is_front_page () ) {
                 wp_enqueue_style( 'rotating-words', get_template_directory_uri() . '/../angle-child-theme/assets/css/rotating-words.css' );
           }
         }
         add_action( 'wp_enqueue_scripts', 'oxy_load_child_scripts');
       ```
   
 * Thank you for your help and merry christmas!

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/child-theme-css-compression-error/#post-6878258)
 * The blank page problem is probably due to the CSS-minification tool ([https://github.com/tubalmartin/YUI-CSS-compressor-PHP-port](https://github.com/tubalmartin/YUI-CSS-compressor-PHP-port))
   is crashing on your child theme CSS. If the problem is only with the frontpage,
   then rotating-words.css is probably triggering something. This could be due to
   a problem with the CSS itself or a problem with the minification-tool. If you
   can provide me with (a link to) that file, I’ll be happy to have a look at what
   might be happening.
 * frank
 *  Plugin Author [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/child-theme-css-compression-error/#post-6878259)
 * (you could, off course, also simply exclude rotating-words.css from CSS optimization)
 *  Thread Starter [pixelmort](https://wordpress.org/support/users/pixelmort/)
 * (@pixelmort)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/child-theme-css-compression-error/#post-6878263)
 * Wow, awesome quick support for an awesome free plugin!
    I currently work on localhost…
 * If you confirm me that wp_enqueue_style is correct, the problem should be probably
   mine. I inspect my CSS :/
 * Thanks
 *  Plugin Author [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/child-theme-css-compression-error/#post-6878270)
 * well, wp_enqueue_style should work, so indeed something in rotating-words.css
   is indeed crashing the minifier (although the minifier might be to blame as well).
   you can also test on the CSS minificatoin on [http://futtta.be/cssmin/gui/](http://futtta.be/cssmin/gui/)
 * frank
 *  Thread Starter [pixelmort](https://wordpress.org/support/users/pixelmort/)
 * (@pixelmort)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/child-theme-css-compression-error/#post-6878293)
 * Thanks for the link, I’ll give it a try.
    Have yourself a Merry Christmas!
 *  Thread Starter [pixelmort](https://wordpress.org/support/users/pixelmort/)
 * (@pixelmort)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/child-theme-css-compression-error/#post-6878488)
 * Hi Frank,
 * first let me thank you for the major update of Autoptimize.
    My problem of blank
   page disappears. I simply split the huge rotating-words.css into two files. I
   have no idea why this is working now, but this thead could be definitively closed.
 * Regards!
 *  Plugin Author [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/child-theme-css-compression-error/#post-6878491)
 * happy to hear it works now pixelmort!
 * regarding that rotating-words.css; what you would also do is minify it yourself
   and save it as rotating-words.min.css, in which case AO 2.0 would not try to 
   minify it any more, but will inject it in the autoptimized file after the minification
   has been done.
 * frank

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Child Theme – CSS Compression error’ is closed to new replies.

 * ![](https://ps.w.org/autoptimize/assets/icon-256X256.png?rev=2211608)
 * [Autoptimize](https://wordpress.org/plugins/autoptimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autoptimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autoptimize/)
 * [Active Topics](https://wordpress.org/support/plugin/autoptimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autoptimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autoptimize/reviews/)

## Tags

 * [child theme](https://wordpress.org/support/topic-tag/child-theme/)
 * [css](https://wordpress.org/support/topic-tag/css/)
 * [wp_enqueue_style()](https://wordpress.org/support/topic-tag/wp_enqueue_style/)

 * 7 replies
 * 2 participants
 * Last reply from: [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * Last activity: [10 years, 5 months ago](https://wordpress.org/support/topic/child-theme-css-compression-error/#post-6878491)
 * Status: resolved