I am creating a child theme of a theme in WordPress. In Parent theme i have style.css and inside css folder of parent theme i have a base.css file ( and some more css files but the problem is only with base.css file ). Somehow it turns out that the sequence in which styles should be loaded is parent->base.css then parent->style.css the child->style.css. I want to ask whether the code below is correct way to do so ? To be specific it's Enough Theme.
functions.php inside child theme
<?php
function my_theme_enqueue_styles() {
$parent_style = 'parent-style';
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css', array('enough_base') );
}
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles', 9 );
?>
<?php
function enqueue_child_theme_styles() {
wp_enqueue_style( 'child-style', get_stylesheet_uri(), array($parent_style) );
}
add_action( 'wp_enqueue_scripts', 'enqueue_child_theme_styles', 11);
?>
<?php
@import
in style of your child-theme for inheriting style. Here, is the link to get more details on child theme creation. codex.wordpress.org/Child_Themes