Skip to content

feat: theme style injection#79

Merged
matthewhilton merged 1 commit intostable-catalystfrom
theme-style-injection
Jan 22, 2026
Merged

feat: theme style injection#79
matthewhilton merged 1 commit intostable-catalystfrom
theme-style-injection

Conversation

@rhell4
Copy link

@rhell4 rhell4 commented Jan 22, 2026

This adds a new hook to allow themes to inject css styling when the H5P editor opens.

There is an existing hook which is hvp_alter_styles, however this hook injects the styling when a library is loaded, meaning styling won't be applied until a library is selected and the styling will be applied whenever a library is loaded. This new hook will inject the styling earlier and will only inject it for the H5P editor and not when viewing a H5P activity.

@matthewhilton
Copy link

I'm not a big fan of passing things by reference as I think it leads to accidental bugs later on, but given it already uses this pattern for hvp_alter_styles then its ok as at least it is consistent.

Looks good to me!

@matthewhilton matthewhilton merged commit a4edf86 into stable-catalyst Jan 22, 2026
14 checks passed
@matthewhilton matthewhilton deleted the theme-style-injection branch January 22, 2026 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants