[resolved] Child for framework.css? (2 posts)

  1. TraciBunkers
    Posted 3 years ago #

    I made a child theme, but what I'm not understanding is how to get a child framework.css to work.

    Anything I do to it doesn't affect the site. But if I change the parent framework.css file, it does.

    In my child framework.css, I've got
    @import url("../blaskan/framework.css"); at the beginning.

    I tried adding my @media changes to my style.css, but that would override all media sizes--meaning if I made a change to something that is for max 480px, it would effect all sizes. But if I made that change in the parent framework.css page, it would only effect that size.

    How can I make changes to the different media without changing the parent framework.css? Or is that the only way to do it? I just seems like my child theme isn't recognizing my framework.css

  2. TraciBunkers
    Posted 3 years ago #

    I found the answer here: http://wordpress.org/support/topic/overrule-frameworkcss-in-child-theme?replies=4

    Paste this into your child functions.php file:

    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' );

    And, your framework.css file needs to have all of the info from the parent framework.css file. I tried doing the import and just putting in my changes, but that didn't work.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic