Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Loading CSS in a custom plugin

plugin plugins

Solved by Geoff Jackson View solution

Started by Geoff Jackson 6 years ago · 1 replies · 1200 views
6 years ago

How should CSS be loaded correctly in a custom plugin?

I've a function onAssetsInitialized which is already loading JS successfully in the plugin.

And am trying to load like the below but this isn't doing anything...

$assets->addCss('plugins://paypal-checkout/assets/paypal-checkout.css');

6 years ago Solution

Ah never mind. This is actually now loading.

I don't know why it wasn't a minute ago.

Suggested topics

Topic Participants Replies Views Activity
Plugins · by DrPen, 3 weeks ago
2 285 3 weeks ago
Plugins · by renedebaaij, 4 weeks ago
1 262 3 weeks ago
Plugins · by Thomas, 4 weeks ago
1 275 4 weeks ago
Plugins · by complanar, 2 months ago
6 596 1 month ago
Plugins · by BenLaKnet, 1 month ago
1 499 1 month ago