MediaWiki:Common.css: Difference between revisions

From feywild

Created page with "Fix infobox spacing: .mw-parser-output .infobox { float: right; clear: none; margin-top: 0.25em; } .mw-parser-output > p:first-of-type { margin-top: 0.25em; } .mw-parser-output > .infobox:first-child + p { margin-top: 0.2em; } .mw-parser-output > ul:first-of-type, .mw-parser-output > ol:first-of-type, .mw-parser-output > blockquote:first-of-type { margin-top: 0.25em; } .mw-parser-output .toc { clear: none; float: none; }"
 
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* Fix infobox spacing */
/* Default paragraph spacing */
.mw-parser-output .infobox {  
.mw-parser-output > p {
   float: right;
   margin-top: .2em;     /* This is the main culprit for the big gap */
  clear: none;  
   margin-bottom: 1em;
   margin-top: 0.25em;
}
}


.mw-parser-output > p:first-of-type {
/* Default for floated elements like infoboxes */
   margin-top: 0.25em;
.mw-parser-output .infobox,
.infobox {
  float: right;
  clear: right;        /* Causes the box to sit below any other right-floated content */
   margin: 0 0 1em 1em; /* top, right, bottom, left */
  border: 1px solid #aaa;
  background-color: #f9f9f9;
  padding: 0.2em;
}
}


.mw-parser-output > .infobox:first-child + p {
/* Heading spacing (just for context) */
   margin-top: 0.2em;
.mw-headline {
  margin-top: 1em;
   margin-bottom: 0.25em;
}
}


.mw-parser-output > ul:first-of-type,
/* The content container itself */
.mw-parser-output > ol:first-of-type,
.mw-parser-output {
.mw-parser-output > blockquote:first-of-type {
   line-height: 1.6;
   margin-top: 0.25em;
   overflow: hidden;
}
 
.mw-parser-output .toc {
  clear: none;  
   float: none;
}
}

Latest revision as of 14:27, 2 November 2025

/* Default paragraph spacing */
.mw-parser-output > p {
  margin-top: .2em;     /* This is the main culprit for the big gap */
  margin-bottom: 1em;
}

/* Default for floated elements like infoboxes */
.mw-parser-output .infobox,
.infobox {
  float: right;
  clear: right;        /* Causes the box to sit below any other right-floated content */
  margin: 0 0 1em 1em; /* top, right, bottom, left */
  border: 1px solid #aaa;
  background-color: #f9f9f9;
  padding: 0.2em;
}

/* Heading spacing (just for context) */
.mw-headline {
  margin-top: 1em;
  margin-bottom: 0.25em;
}

/* The content container itself */
.mw-parser-output {
  line-height: 1.6;
  overflow: hidden;
}