3

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?

3

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)

enter image description here

  • 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.MOO Sep 17 at 12:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.