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?

1 Answer 1

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.
1
  • 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
    Commented Sep 17, 2019 at 12:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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