Jump to content

User:GhostInTheMachine/SD-display-helper.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
mw.util.addCSS(`

/* show any of the embedded SD */

.shortdescription {
  display: inline-block !important;	/* the important is important */
  background-color: cornsilk;
  padding: 3px;
  border: blue dashed 2px;
}

/* needed when the SD helper is also displaying the SD */

#siteSub {
  display: none;
}

/* move the SD helper down a bit so that it clears the title */

#sdh {
  padding-top: 10px;
}

/* larger text when editing the SD and the edit summary */

#sdh-descriptionbox, #sdh-summarybox {
  font-size: 150%;
  margin-top: 5px;
}

/* highlight the description in the SD helper prior to editing and when missing */

.mw-page-description, .sdh-missing-description {
  border: red solid 1px;
  padding: 10px;
  font-size: 120%;
  background-color: cornsilk;
  display: inline-block;
}

`);