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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Plugins

Loading CSS in a custom plugin

plugin plugins

Solved by Geoff Jackson View solution

Started by Geoff Jackson 5 years ago · 1 replies · 627 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 Rene, 1 week ago
2 41 1 week ago
Plugins · by Xavier, 4 weeks ago
2 50 4 weeks ago
Plugins · by Luka Prinčič, 7 years ago
3 1178 1 month ago
Plugins · by Sebastian van de Meer, 1 month ago
1 45 1 month ago
Plugins · by PIERROT Alain, 2 months ago
3 68 2 months ago