The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Overrule framework.css in Child theme (4 posts)

  1. NvanMJ
    Posted 4 years ago #

    Is it possible to use a framework.css in a WordPress Child Theme to overrule the original framework.css? Just as the other items like style.css?

    I've made some changes but they only work when I adjust the original framework.css.

  2. Digital Raindrops
    Posted 4 years ago #

    It would depend on the theme, some themes load styles directly into the header.

    you can make the new styles !important;



  3. Per Sandström
    Posted 4 years ago #

    To override the framework.css in Blaskan with your own framework.css in your child theme add this code to the functions.php file in your child theme:

    function blaskan_css_init() {
      if ( !is_admin() && !in_array( $GLOBALS['pagenow'], array( 'wp-login.php', 'wp-signup.php', 'wp-register.php' ) ) ) {
        wp_enqueue_style( 'blaskan-framework', get_stylesheet_directory_uri() . '/framework.css', array(), false, 'screen' );
        wp_enqueue_style( 'blaskan-style', get_bloginfo('stylesheet_url'), array(), false, 'screen' );
  4. NvanMJ
    Posted 4 years ago #

    Thnx David, Per!

    Didn't tought about !important, but it works in some themes. The code from Per works perfect for my Blaskan-based theme, ;).

Topic Closed

This topic has been closed to new replies.

About this Topic