Jump to content

MediaWiki:Common.css: Difference between revisions

No edit summary
No edit summary
 
(10 intermediate revisions by the same user not shown)
Line 403: Line 403:
}
}


/* Remove top margin and collapse stray VisualEditor paragraphs */
/* Hide stray VisualEditor <p><br></p> after infoboxes */
.mw-body-content > p:first-child {
.mw-parser-output .infobox + p:has(br) {
     margin-top: 0 !important;
    display: none !important;
     padding-top: 0 !important;
     margin: 0 !important;
     padding: 0 !important;
}
}


/* Hide blank or whitespace-only paragraphs at the top of content */
/* === Mobile Infobox Layout Fix === */
.mw-body-content > p:first-child:has(br),
@media (max-width: 768px) {
.mw-body-content > p:first-child:has(> span:empty),
  /* Force infoboxes to drop below text and use full width */
.mw-body-content > p:first-child:has(> span[style*="display:none"]),
  .infobox {
.mw-body-content > p:first-child:has(> span[contenteditable]) {
    float: none !important;
     display: none !important;
    margin: 1em auto !important;
    width: 100% !important;
    max-width: 100% !important;
    clear: both !important;
    display: block !important;
  }
 
  /* Slight padding and center alignment for aesthetics */
  .infobox th,
  .infobox td {
    padding: 0.4em !important;
  }
 
  /* Make sure text wraps nicely */
  .infobox td,
  .infobox th {
    word-wrap: break-word !important;
  }
}
 
/* === Desktop: show full wordmark === */
.mw-logo-icon { display: none !important; }
.mw-logo-wordmark { display: inline-block !important; }
 
/* === Mobile (under 768px): hide wordmark, show square icon === */
@media (max-width: 768px) {
  .mw-logo-wordmark { display: none !important; }
  .mw-logo-icon {
    display: inline-block !important;
    content: url("https://untenables.com/images/2/26/Favicon.png");
    width: 42px;
    height: auto;
     margin-top: 4px;
  }
}
}