MediaWiki:Common.css:修订间差异
来自迷你世界维基
| 无编辑摘要 | 无编辑摘要 | ||
| 第1行: | 第1行: | ||
| /* =================================================================== */ | /* =================================================================== */ | ||
| /* Modern Infobox Styles (Final Version)  | /* Modern Infobox Styles (Final Version with All Fixes)                */ | ||
| /* =================================================================== */ | /* =================================================================== */ | ||
| 第8行: | 第7行: | ||
|    float: right; |    float: right; | ||
|    width: 300px; |    width: 300px; | ||
|    height: auto !important; /*  |    height: auto !important; /* Forces height to wrap content */ | ||
|   min-height: 0 !important; /* Prevents mobile themes from forcing a minimum height */ | |||
|    margin: 0.5em 0 1em 1.5em; |    margin: 0.5em 0 1em 1.5em; | ||
|    background-color: #f8f9fa; |    background-color: #f8f9fa; | ||
| 第61行: | 第61行: | ||
| } | } | ||
| /* --- 6. Label Column  | /* --- 6. Label Column --- */ | ||
| .modern-infobox .modern-infobox-label { | .modern-infobox .modern-infobox-label { | ||
|    width: 35%; |    width: 35%; | ||
| 第69行: | 第69行: | ||
| } | } | ||
| /* --- 7. Data Column  | /* --- 7. Data Column --- */ | ||
| .modern-infobox .modern-infobox-data { | .modern-infobox .modern-infobox-data { | ||
|    width: 65%; |    width: 65%; | ||
| 第75行: | 第75行: | ||
| } | } | ||
| /*  | /* --- 8. Links within the infobox --- */ | ||
| .modern-infobox .modern-infobox-data a { | .modern-infobox .modern-infobox-data a { | ||
|    color: #0056b3; |    color: #0056b3; | ||
| 第83行: | 第83行: | ||
| } | } | ||
| /* ---  | /* --- 9. Footer/Warning Message --- */ | ||
| .modern-infobox .modern-infobox-footer { | .modern-infobox .modern-infobox-footer { | ||
|    background-color: #fff3cd; |    background-color: #fff3cd; | ||
| 第93行: | 第93行: | ||
| } | } | ||
| /* ---  | /* --- 10. Responsive Design for Mobile --- */ | ||
| @media (max-width: 720px) { | @media (max-width: 720px) { | ||
|    .modern-infobox { |    .modern-infobox { | ||
2025年10月2日 (四) 13:35的版本
/* =================================================================== */
/* Modern Infobox Styles (Final Version with All Fixes)                */
/* =================================================================== */
/* --- 1. Main Container: The Card Itself --- */
.modern-infobox {
  float: right;
  width: 300px;
  height: auto !important; /* Forces height to wrap content */
  min-height: 0 !important; /* Prevents mobile themes from forcing a minimum height */
  margin: 0.5em 0 1em 1.5em;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  border-collapse: separate;
  border-spacing: 0;
  font-size: 90%;
  line-height: 1.6;
  overflow: hidden;
}
/* --- 2. Header: The Title Bar --- */
.modern-infobox .modern-infobox-header {
  background-color: #495057;
  color: #ffffff;
  font-size: 1.25em;
  font-weight: 600;
  padding: 0.8em 1em;
  text-align: center;
}
/* --- 3. Image Area --- */
.modern-infobox .modern-infobox-image {
  padding: 1em;
  text-align: center;
  background-color: #ffffff;
}
.modern-infobox .modern-infobox-image img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  display: block;
}
/* --- 4. Image Caption --- */
.modern-infobox .modern-infobox-caption {
  margin-top: 0.75em;
  font-size: 0.95em;
  color: #6c757d;
  line-height: 1.4;
}
/* --- 5. Data Rows: Labels and Information --- */
.modern-infobox .modern-infobox-label,
.modern-infobox .modern-infobox-data {
  padding: 0.7em 1em;
  border-top: 1px solid #dee2e6;
  vertical-align: top;
}
/* --- 6. Label Column --- */
.modern-infobox .modern-infobox-label {
  width: 35%;
  font-weight: 600;
  color: #495057;
  white-space: nowrap;
}
/* --- 7. Data Column --- */
.modern-infobox .modern-infobox-data {
  width: 65%;
  color: #212529;
}
/* --- 8. Links within the infobox --- */
.modern-infobox .modern-infobox-data a {
  color: #0056b3;
}
.modern-infobox .modern-infobox-data a:visited {
  color: #4a1a7a;
}
/* --- 9. Footer/Warning Message --- */
.modern-infobox .modern-infobox-footer {
  background-color: #fff3cd;
  color: #856404;
  text-align: center;
  padding: 0.7em;
  font-size: 0.9em;
  border-top: 1px solid #dee2e6;
}
/* --- 10. Responsive Design for Mobile --- */
@media (max-width: 720px) {
  .modern-infobox {
    float: none;
    width: 100%;
    margin: 1.5em 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  }
}
