elementor / hello-theme-child

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BUG, important! CSS overwrite bug!

learningnewthings opened this issue · 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.

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.

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',
]

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.

Fixed in #21