hello-theme-child icon indicating copy to clipboard operation
hello-theme-child copied to clipboard

BUG, important! CSS overwrite bug!

Open learningnewthings opened this issue 5 years ago • 3 comments

The CSS stylesheets loading order is wrong. It loads: child hello theme style.css, then main hello theme style.css Correct loading order: main hello theme style.css, then child hello theme style.css

because child hello theme is suppose to overwrite the main hello theme.

I've discovered the BUG after installing and trying to change the background for the body. and I needed to use body { background: red !important; } , then I've looked into inspect element and I've seen the wrong loading order.

Many thanks.

learningnewthings avatar Apr 26 '20 00:04 learningnewthings

One easy fix is to add a the priority parameter (I guess 10 is the default, so choose bigger than 10), i.e. :

add_action( 'wp_enqueue_scripts', 'hello_elementor_child_enqueue_scripts', 11);

please don't ask me for pull request, also I don't own number 11, it's basic stuff straight out the wordpress docs, so don't ask me to sign any contributor agrement.

Best of luck.

learningnewthings avatar Apr 26 '20 01:04 learningnewthings

The problem isn't that the priority isn't high enough, it's that there are two main stylesheets. The dependencies should be

[
    'hello-elementor`,
    'hello-elementor-theme-style',
]

skeemer avatar Aug 25 '20 16:08 skeemer

Agree that this should be fixed since I recently found that in the style.min.css it has been changed to font-family:inherit; which basically overrides all the basic font settings I had made.

shaneonabike avatar Sep 20 '21 18:09 shaneonabike

Fixed in #21

rami-elementor avatar Apr 29 '23 19:04 rami-elementor