I use Pre tags to embed code lines into my MediaWiki page. Problem is that Pre tag generates a blue-ish box behind the pre-formatted text which is parsed into a table when you set printable=yes in the page's URL. The question is whether or not there is a way to edit this, or change the table in any way or to turn this off when printable=yes?
1 Answer
whether or not there is a way to edit this, or change the table in any way or to turn this off when printable=yes?
Yes to all question parts.
The question "how" wasn't there, correct?
Nevertheless:
- inspect the box with developer tools to get into knowledge, where comes the style from.
- Is it from MediaWiki - so locate it with developer tools and change it according your wishes.
- Is it a kind of shadow DOM element (an element created/styled by browser, like on screenshot)
- restyle (override) it according to your wishes with own CSS style, like here.
-
Thanks a lot for the hints. For future references, I add that if you do a search for ".wm-code" in your wiki's folder, you'll probably find the two files: resources/src/mediawiki.skinning/elements.css resources/src/mediawiki.legacy/commonPrint.css And inside you'll get all the attributes for the mw-code which modifies the pre-formatted texts in your wiki.– OOZ.MOOCommented Sep 17, 2019 at 12:15