Jdv
Jdv

Reputation: 993

MediaWiki: Where to put custom css classes?

I'm extending an MediaWiki and it's VisualEditor-plugin by adding custom data structures. Those also need css classes. I've figured how to add them to the VisualEditor, but as soon as I leave it and refresh (that's strange, when I save the changes made in VisualEditor the css-effects are visible in the normal view until I refresh), the css effects disappear.

I'm saving the css-classes in an VisualEditor-directory, so I understand that it does not necessarily has to be shown outside of it. But I sadly do not know where to put them. I've seen some classes are added in commonPrint.css in mediawiki.legacy, but adding the classes there didn't help sadly (although they show up when I check the source via Chrome DevTools).

Upvotes: 3

Views: 1538

Answers (2)

johny why
johny why

Reputation: 2201

and then use https://www.mediawiki.org/wiki/Extension:CSS to apply your CSS to whichever individual pages you want.

Upvotes: 0

Rob Kam
Rob Kam

Reputation: 10268

For screen [[MediaWiki:Common.css]] and for printer [[MediaWiki:Print.css]].

Upvotes: 4

Related Questions