Do I only need to import style.css for a child theme?

I am creating a child theme for the first time, and sort of learning as I go.

I am having an issue with the way videos are showing up on a mobile phone with my child theme, but not with my parent theme. I’m wondering what is going on.

Read More

On my child theme the videos show up large when viewed on a mobile device (http://wpdallas.com/test)

However, in the parent theme the videos show up fine: http://wpdallas.com/plain

In my child them I am importing the following css, do I need to import every CSS file into my child theme, or just the style.css? (I’ve found conflicting info when learning how to do this.)The parent theme has about 20 different css files. I’m wondering if I need to import them all into my child theme, or if I need to delete the other two below, and just leave the first one (style.css.)

Just trying to figure out why the child theme isn’t styling correctly. Thanks.

 @import url("../Standard/style.css");
    @import url("../Standard/standard_framework/css/standard_framework.css"); 
    @import url("../Standard/css/lib/adapt/mobile.css");

Related posts

Leave a Reply

1 comment

  1. This question depends entirely on the Theme in question, and how it handles CSS.

    1. For a Theme that uses only a single style.css file, obviously, you only need to import style.css.
    2. For a Theme that links other stylesheets in the document head (they shouldn’t be doing this; instead, they should be properly enqueueing them), you’ll need to determine whether or not you want to leave those links in header.php, based on whether or not you want to use the styles defined in those stylesheets.
    3. For a Theme that enqueues additional stylesheets, via wp_enqueue_style(), you don’t need to do anything. Such stylesheets will continue to be enqueued in the Child Theme. If you don’t want those styles, then you need to dequeue those stylesheets, via wp_dequeue_style() in the Child Theme functions.php.
    4. For a Theme that prints styles in the document head, via add_action( 'wp_print_styles', $callback ), you don’t need to do anything. Such stylesheets will continue to be printed in the Child Theme. If you don’t want those styles, then you need to override the output of those stylesheets, via remove_action( 'wp_print_styles', $callback ) in the Child Theme functions.php.

    I think that covers most of the bases.