MediaWiki:Common.css:修订间差异

来自迷你世界维基
 
无编辑摘要
第1行: 第1行:
/* 这里放置的CSS将应用于所有皮肤 */
/* =================================================================== */
/* =================================================================== */
/* Modern Infobox Styles (Added on YYYY-MM-DD)                         */
/* Modern Infobox Styles (Final Version)                               */
/* Description: A modern, clean, and responsive style for infoboxes.  */
/* Description: A clean, responsive, and robust style for infoboxes.  */
/* =================================================================== */
/* =================================================================== */


第9行: 第8行:
   float: right;
   float: right;
   width: 300px;
   width: 300px;
   margin: 0.5em 0 1em 1.5em; /* Spacing around the box */
  height: auto !important; /* Fixes unwanted stretching by overriding other styles */
   background-color: #f8f9fa; /* A very light grey, almost white */
   margin: 0.5em 0 1em 1.5em;
   border: 1px solid #dee2e6; /* Soft border color */
   background-color: #f8f9fa;
   border-radius: 8px; /* Rounded corners for a softer look */
   border: 1px solid #dee2e6;
   box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05); /* Subtle shadow for a "lifting" effect */
   border-radius: 8px;
   border-collapse: separate; /* Important for making border-radius work on tables */
   box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
   border-collapse: separate;
   border-spacing: 0;
   border-spacing: 0;
   font-size: 90%;
   font-size: 90%;
   line-height: 1.6;
   line-height: 1.6;
   overflow: hidden; /* Ensures all content stays within the rounded corners */
   overflow: hidden;
}
}


/* --- 2. Header: The Title Bar --- */
/* --- 2. Header: The Title Bar --- */
.modern-infobox .modern-infobox-header {
.modern-infobox .modern-infobox-header {
   background-color: #495057; /* A modern, dark grey */
   background-color: #495057;
   color: #ffffff;
   color: #ffffff;
   font-size: 1.25em; /* Makes the title slightly larger */
   font-size: 1.25em;
   font-weight: 600;
   font-weight: 600;
   padding: 0.8em 1em;
   padding: 0.8em 1em;
第35行: 第35行:
   padding: 1em;
   padding: 1em;
   text-align: center;
   text-align: center;
   background-color: #ffffff; /* A clean white background for the image */
   background-color: #ffffff;
}
}


第41行: 第41行:
   max-width: 100%;
   max-width: 100%;
   height: auto;
   height: auto;
   border-radius: 4px; /* Slightly rounded corners for the image */
   border-radius: 4px;
   display: block;
   display: block;
}
}
第49行: 第49行:
   margin-top: 0.75em;
   margin-top: 0.75em;
   font-size: 0.95em;
   font-size: 0.95em;
   color: #6c757d; /* A muted grey for less important text */
   color: #6c757d;
   line-height: 1.4;
   line-height: 1.4;
}
}
第57行: 第57行:
.modern-infobox .modern-infobox-data {
.modern-infobox .modern-infobox-data {
   padding: 0.7em 1em;
   padding: 0.7em 1em;
   border-top: 1px solid #dee2e6; /* Clean separator line */
   border-top: 1px solid #dee2e6;
   vertical-align: top; /* Aligns content to the top if it wraps */
   vertical-align: top;
}
}


第64行: 第64行:
.modern-infobox .modern-infobox-label {
.modern-infobox .modern-infobox-label {
   width: 35%;
   width: 35%;
   font-weight: 600; /* Semi-bold for clarity */
   font-weight: 600;
   color: #495057; /* Dark grey for labels */
   color: #495057;
   white-space: nowrap; /* Prevents labels from wrapping to two lines */
   white-space: nowrap;
}
}


第72行: 第72行:
.modern-infobox .modern-infobox-data {
.modern-infobox .modern-infobox-data {
   width: 65%;
   width: 65%;
   color: #212529; /* Standard text color */
   color: #212529;
}
}


/* Style for links within the infobox */
/* Style for links within the infobox */
.modern-infobox .modern-infobox-data a {
.modern-infobox .modern-infobox-data a {
   color: #0056b3; /* A standard, readable link color */
   color: #0056b3;
}
}
.modern-infobox .modern-infobox-data a:visited {
.modern-infobox .modern-infobox-data a:visited {
第85行: 第85行:
/* --- 8. Footer/Warning Message --- */
/* --- 8. Footer/Warning Message --- */
.modern-infobox .modern-infobox-footer {
.modern-infobox .modern-infobox-footer {
   background-color: #fff3cd; /* A soft yellow for warnings */
   background-color: #fff3cd;
   color: #856404;
   color: #856404;
   text-align: center;
   text-align: center;
第96行: 第96行:
@media (max-width: 720px) {
@media (max-width: 720px) {
   .modern-infobox {
   .modern-infobox {
     float: none; /* Disables floating on mobile */
     float: none;
     width: 100%; /* Makes the box full-width */
     width: 100%;
     margin: 1.5em 0; /* Adjusts margin for vertical flow */
     margin: 1.5em 0;
     box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* Reduces shadow on mobile */
     box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
   }
   }
}
}

2025年10月2日 (四) 13:31的版本

/* =================================================================== */
/* Modern Infobox Styles (Final Version)                               */
/* Description: A clean, responsive, and robust style for infoboxes.   */
/* =================================================================== */

/* --- 1. Main Container: The Card Itself --- */
.modern-infobox {
  float: right;
  width: 300px;
  height: auto !important; /* Fixes unwanted stretching by overriding other styles */
  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 (e.g., "Born", "Occupation") --- */
.modern-infobox .modern-infobox-label {
  width: 35%;
  font-weight: 600;
  color: #495057;
  white-space: nowrap;
}

/* --- 7. Data Column (The actual info) --- */
.modern-infobox .modern-infobox-data {
  width: 65%;
  color: #212529;
}

/* Style for links within the infobox */
.modern-infobox .modern-infobox-data a {
  color: #0056b3;
}
.modern-infobox .modern-infobox-data a:visited {
  color: #4a1a7a;
}

/* --- 8. 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;
}

/* --- 9. Responsive Design for Mobile Phones --- */
@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);
  }
}