Template:StatTable/styles.css: Difference between revisions

From I-Pixelmon
Jump to navigation Jump to search
No edit summary
No edit summary
 
(24 intermediate revisions by 2 users not shown)
Line 1: Line 1:
/* one logical row */
/* ── frame ─────────────────────────────────────────── */
.stat-row {
.statbox table{
   display: grid;
  border:3px solid #444;      /* colour is overridden inline in the template */
   grid-template-columns: 8.5em auto 3.5em/* label · bar · value */
  border-radius:10px;
   font-weight: 700;
   background:#d7d8e8;
   border-collapse:separate;
  margin-top: 10px;
   max-width:620px;
   font-family:inherit;
}
}


/* label cell (scope=row) */
.statnumber{
.stat-lbl {
  display:inline-block;      /* reserve space even for 2-digit # */
   padding: 2px 4px;
   width:3ch;                 /* enough for 000-255              */
   text-align: right;
   text-align:right;           /* flush against the right edge    */
}
}


/* numerical value at the far right */
/* ── first column: label + value ───────────────────── */
.stat-val {
.lab{
   padding: 2px 4px;
   display:flex;
   text-align: right;
   justify-content:space-between;
   background: #dcdce9;           /* same slate-grey as Bulbapedia */
  align-items:center;
  font-weight:700;
  font-size:110%;
  white-space:nowrap;
  min-width: 100px;
   padding:0 4px;             /* tiny gap left/right              */
}
}


/* bar container (light tint)  */
/* ── second column: bar background ─────────────────── */
.stat-bar {
td.bar{padding:0}
   position: relative;
.fill{
   height: 18px;
  height:20px;
   border:1px solid rgba(0,0,0,.25);
   background:#777;           /* replaced inline per-row */
}
}


/* coloured inner bar (darker tint) */
.statbox td.bar {
.stat-fill {
   width: 255px;
   position: absolute;
  top: 0; left: 0;
  height: 100%;
}
}


/* tints ----------------------------------------------------------- */
/* row colours + bar colours */
.hp  { background:#ffb1b1; } .hp  .stat-fill{background:#ff6b6b;}
.row-hp  {background:#9EE865} .row-hp  .fill{background:#69DC12}
.atk { background:#f3c29e; } .atk .stat-fill{background:#f0a15b;}
.row-atk {background:#F5DE69} .row-atk .fill{background:#EFCC18}
.def { background:#f8eba3; } .def .stat-fill{background:#f3d659;}
.row-def {background:#F09A65} .row-def .fill{background:#E86412}
.spa { background:#b9c8f5; } .spa .stat-fill{background:#81a0f3;}
.row-spa {background:#66D8F6} .row-spa .fill{background:#14C3F1}
.spd { background:#c6e4b6; } .spd .stat-fill{background:#9cd478;}
.row-spd {background:#899EEA} .row-spd .fill{background:#4A6ADF}
.spe { background:#f7bdd5; } .spe .stat-fill{background:#f593bd;}
.row-spe {background:#E46CCA} .row-spe .fill{background:#D51DAD}


/* total row ------------------------------------------------------- */
/* total row */
.total-row {
.total   {background:#d7d8e8}
  background:#dcdce9;
.total .lab{padding:6px;font-weight:700}
   text-align:center;
.total .bar{background:none}
   padding:4px;
 
   font-weight:700;
/* centre the two “Range” cells */
   border-top:2px solid #555;
.statbox td.range{
   text-align:center;     /* horizontal */
   vertical-align:middle; /* vertical  */
}
 
/* make the small sub-headers a bit smaller */
.statbox th.hdr-sub{
   font-size:85%;
   font-weight:600;       /* keep them bold-ish */
}
}

Latest revision as of 05:28, 2 June 2025

/* ── frame ─────────────────────────────────────────── */
.statbox table{
  border:3px solid #444;      /* colour is overridden inline in the template */
  border-radius:10px;
  background:#d7d8e8;
  border-collapse:separate;
  margin-top: 10px;
  max-width:620px;
  font-family:inherit;
}

.statnumber{
  display:inline-block;       /* reserve space even for 2-digit # */
  width:3ch;                  /* enough for 000-255               */
  text-align:right;           /* flush against the right edge     */
}

/* ── first column: label + value ───────────────────── */
.lab{
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-weight:700;
  font-size:110%;
  white-space:nowrap;
  min-width: 100px;
  padding:0 4px;              /* tiny gap left/right              */
}

/* ── second column: bar background ─────────────────── */
td.bar{padding:0}
.fill{
  height:20px;
  border:1px solid rgba(0,0,0,.25);
  background:#777;            /* replaced inline per-row */
}

.statbox td.bar {
  width: 255px;
}

/* row colours + bar colours */
.row-hp  {background:#9EE865} .row-hp  .fill{background:#69DC12}
.row-atk {background:#F5DE69} .row-atk .fill{background:#EFCC18}
.row-def {background:#F09A65} .row-def .fill{background:#E86412}
.row-spa {background:#66D8F6} .row-spa .fill{background:#14C3F1}
.row-spd {background:#899EEA} .row-spd .fill{background:#4A6ADF}
.row-spe {background:#E46CCA} .row-spe .fill{background:#D51DAD}

/* total row */
.total   {background:#d7d8e8}
.total .lab{padding:6px;font-weight:700}
.total .bar{background:none}

/* centre the two “Range” cells */
.statbox td.range{
  text-align:center;     /* horizontal */
  vertical-align:middle; /* vertical   */
}

/* make the small sub-headers a bit smaller */
.statbox th.hdr-sub{
  font-size:85%;
  font-weight:600;       /* keep them bold-ish */
}