Template:StatTable/styles.css: Difference between revisions

From I-Pixelmon
Jump to navigation Jump to search
No edit summary
Tag: Reverted
No edit summary
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* ── Frame & Layout ───────────────────────────────── */
/* ── frame ─────────────────────────────────────────── */
.statbox table {
.statbox table{
   border: 3px solid #444;           /* overridden by inline |frame= */
   border:3px solid #444;     /* colour is overridden inline in the template */
   border-radius: 10px;
   border-radius:10px;
   background: #d7d8e8;
   background:#d7d8e8;
   border-collapse: separate;
   border-collapse:separate;
   margin: auto;
   margin-top: 10px;
   max-width: 620px;
   max-width:620px;
  width: auto;                      /* shrink-to-fit */
   font-family:inherit;
   font-family: inherit;
}
}


/* ── First column (stat name/value) & Bar column ───────────────── */
.statnumber{
.statbox td.bar {
  display:inline-block;      /* reserve space even for 2-digit # */
   padding: 0;
   width:3ch;                 /* enough for 000-255              */
   width: 255px;                     /* fixed bar cell width */
   text-align:right;           /* flush against the right edge    */
}
}
.statbox .lab {
 
   display: flex;
/* ── first column: label + value ───────────────────── */
   justify-content: space-between;
.lab{
   align-items: center;
   display:flex;
   font-weight: 700;
   justify-content:space-between;
   font-size: 110%;
   align-items:center;
   white-space: nowrap;
   font-weight:700;
   font-size:110%;
   white-space:nowrap;
  min-width: 100px;
  padding:0 4px;              /* tiny gap left/right              */
}
}
.statbox .fill {
 
   height: 20px;
/* ── second column: bar background ─────────────────── */
   border: 1px solid rgba(0,0,0,0.25);
td.bar{padding:0}
   background: #777;                 /* overridden per-row */
.fill{
   height:20px;
   border:1px solid rgba(0,0,0,.25);
   background:#777;           /* replaced inline per-row */
}
}


/* ── Range columns ─────────────────────────────────── */
.statbox td.bar {
.statbox td.range,
   width: 255px;
.statbox th.hdr-sub {
  text-align: center;
   width: 100px;                    /* adjust as needed */
}
.statbox td.range {
  padding: 3px 6px;
  vertical-align: middle;
}
.statbox td.range small {
  display: block;
  font-size: 90%;
}
}


/* ── Header styling ────────────────────────────────── */
/* row colours + bar colours */
.statbox thead th {
.row-hp  {background:#9EE865} .row-hp  .fill{background:#69DC12}
  background: #e0e1eb;
.row-atk {background:#F5DE69} .row-atk .fill{background:#EFCC18}
  font-weight: 700;
.row-def {background:#F09A65} .row-def .fill{background:#E86412}
  padding: 4px 8px;
.row-spa {background:#66D8F6} .row-spa .fill{background:#14C3F1}
  white-space: nowrap;
.row-spd {background:#899EEA} .row-spd .fill{background:#4A6ADF}
  border-bottom: 2px solid rgba(0,0,0,0.2);
.row-spe {background:#E46CCA} .row-spe .fill{background:#D51DAD}
}
/* Round top corners of the header row to match the table */
.statbox thead tr:first-child th.hdr-stat {
  border-top-left-radius: 10px;
}
.statbox thead tr:first-child th.hdr-range {
  border-top-right-radius: 10px;
}


/* ── Row colours & bar fills ───────────────────────── */
/* total row */
.statbox tr.row-hp  { background: #9EE865; }
.total  {background:#d7d8e8}
.statbox tr.row-hp  .fill { background: #69DC12; }
.total .lab{padding:6px;font-weight:700}
.statbox tr.row-atk { background: #F5DE69; }
.total .bar{background:none}
.statbox tr.row-atk .fill { background: #EFCC18; }
.statbox tr.row-def { background: #F09A65; }
.statbox tr.row-def .fill { background: #E86412; }
.statbox tr.row-spa { background: #66D8F6; }
.statbox tr.row-spa .fill { background: #14C3F1; }
.statbox tr.row-spd { background: #899EEA; }
.statbox tr.row-spd .fill { background: #4A6ADF; }
.statbox tr.row-spe { background: #E46CCA; }
.statbox tr.row-spe .fill { background: #D51DAD; }


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

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 */
}