Override ie.css in TwentyTwelve for Child Theme

TwentyTwelve loads ie.css from functions.php so to override it in your child theme use the following in your themes functions.php

// remove ie css from twentytwelve theme
function mytheme_dequeue_styles() {
wp_dequeue_style( 'twentytwelve-ie' );
}
add_action( 'wp_enqueue_scripts', 'mytheme_dequeue_styles', 11 );
//add new from child theme
wp_enqueue_style( 'mytheme-ie', get_stylesheet_directory_uri() . '/css/ie.css', array( 'twentytwelve-style' ), '1.0' );
$wp_styles->add_data( 'mytheme-ie', 'conditional', 'lt IE 9' );

Place ie.css in your themes css directory.

Original post here

Leave a Comment