Skip to content
Grav 2.0 is officially stable. Read the announcement →
Plugins

Loading CSS in a custom plugin

plugin plugins

Solved by Geoff Jackson View solution

Started by Geoff Jackson 5 years ago · 1 replies · 692 views
5 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');

5 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 Slebeig, 5 days ago
1 102 5 days ago
Plugins · by Rene, 4 weeks ago
2 303 4 weeks ago
Plugins · by Xavier, 2 months ago
2 223 1 month ago
Plugins · by Luka Prinčič, 7 years ago
3 1411 2 months ago
Plugins · by Sebastian van de Meer, 2 months ago
1 322 2 months ago