Child theme problem

Am unable to comment and ask qns, so done as answer. Point 3 below does identify an error; the rest I expect you’ve covered. I’ve also added my own working enqueuer (but I only needed style.css)

  1. ensure the value specified for “Template:” at the top of your CSS matches the value for “Theme:” in parent’s CSS

  2. View HTML source of page from your browser. What styles if any are listed in “html under <head>? This info may help with answers.

  3. WP Codex says the first argument/parameter of wp_enqueue_style must be a unique “handle” (name); but in your last example you use ‘parent-style’ as the handle for every style sheet.

  4. check parent’s functions.php and see exactly what is being “enqueued”.

  5. if its any help, this is code that works for me from my Hemingway child functions.php (I only need style.css). Note I am not using a string ‘parent_style’ but variable $parent_style which has been assigned a value. The WP Codex link above explains other settings used.

    function my_theme_enqueue_styles() {
      $parent_style="hemingway_style";
      wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
      wp_enqueue_style( 'child-style',
         get_stylesheet_directory_uri() . '/style.css', array( $parent_style), wp_get_theme()->get('Version') );
    }
    add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
    
  6. In answer to your question by enqueuing child CSS last you ensures that where Child and Parent CSS rules conflict then the CSS rules will be used by the browser.