Plugin CSS takes priority over theme CSS?

My theme cannot override my plugin CSS because it’s loaded before the plugins. Is this a bug or a permanent change (2.4.1)?

1 Like

Hmm yes, you’re right. We load core, then themes, then plugins

I think core --> plugins --> themes would be a better order, and would match the pre-plugin-debundling behaviour. What do you think @awesomerobot @Johani @jordan.vidrine?

@WorldIsMine a workaround is to increase the specificity of theme’s CSS.

10 Likes

Yeah that sounds like a better order to me too!

5 Likes

Prior to 2.4 applying changes to theme CSS worked, so is this considered an unintentional bug?

1 Like

Thank you, I will look into this.

1 Like

Plugin CSS used to be all bundled up together, and loaded after the core stylesheets. So yes, this is an unintentional side-effect of us debundling it. I think we can backport this fix to stable, it is very low risk. I don’t think anyone will be relying on this behaviour.

Opened a PR here:

5 Likes

When is a realistic time frame when this change will go into effect? I have lots plugins on my instance and spend the last two days upgrading things so they’re compatible with 2.4.1 and this is the only nuisance keeping me from upgrading :smiley:

2 Likes

I just merged it to master, planning to backport to beta and stable in the next hour (unless there are issues) :slight_smile:

(Edit: bit delayed due to some unrelated test issues, but will get it backported ASAP)

8 Likes

You guys rock! <3 Thank you very much for the quick support.

2 Likes

Took a little longer than planned, but that’s done on stable, beta and tests-passed. Head to /admin/upgrade and update to the latest version to get the fixed behaviour.

4 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.