Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Loading CSS in a custom plugin

plugin plugins

Solved by Geoff Jackson View solution

Started by Geoff Jackson 6 years ago · 1 replies · 1093 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 complanar, 2 weeks ago
6 345 1 week ago
Plugins · by BenLaKnet, 1 week ago
1 167 1 week ago
Plugins · by complanar, 1 month ago
2 449 3 weeks ago
Plugins · by Vladimir Novak, 2 months ago
3 735 2 months ago
Plugins · by Mathieu Lecouturier, 2 months ago
3 577 2 months ago