Different ways to load child theme css

There’s nothing wrong with css rules ending up in your inspector twice. In many cases you want the first version, loading both parent and child styles. After all, in that case your child style sheet only needs to have the styles you want different from the parent. The browser will correctly apply the child rule if they’re both there. If the parent theme style sheet is not there and the child theme style sheet is incomplete, your theme will break.

The second version you give indeed only loads the child style sheet. The filter makes sure that if the theme asks for something from the style directory (like an icon or a secondary stylesheet), it is retrieved from the parent directory. If you use the second version, make sure you copy the complete parent style.css and adapt that one.

tech