Template:KeyMoves/style.css: Difference between revisions

Template page
(Created page with "→‎gonna rewrite this to use a grid layout tomorrow: .key-move { min-width: 20px; width: calc(20vw - 32px); max-width: 80px; } .key-moves-legend .key-move { wid...")
 
No edit summary
Line 1: Line 1:
/* gonna rewrite this to use a grid layout tomorrow */
.key-moves {
  display: block;
  max-width: 600px;
}


.key-move {
.key-moves tbody {
   min-width: 20px;
   display: grid;
   width: calc(20vw - 32px);
   grid-template-columns: auto repeat(5, 1fr);
   max-width: 80px;
  grid-auto-rows: auto;
   align-items: center;
  gap: 2px;
}
}


.key-moves-legend .key-move {
.key-moves tr {
  width: 30px;
  display: contents;
}
}


.key-moves td {
.key-moves td:first-of-type {
   text-align: center;
   text-align: center;
  grid-column: 1;
}
}


.key-move.primary { height: 1.8ex; }
.key-moves th {
.key-move.secondary { height: 1.2ex; }
  overflow: hidden;
.key-move.extra { height: 0.6ex; }
  white-space: nowrap;
  text-overflow: '·';
}


.key-moves-cropheader {
.key-move-cell {
  display: none;
  width: 30px;
}
}


@media (max-width: 560px) {
@supports (display: grid) {
  .key-moves-cropheader {
  .key-moves .key-move-cell {
    display: inline;
      width: 100%;
  }
  }
 
  .key-moves-fullheader {
    display: none;
  }
}
}
.key-move-cell.primary { height: 1em; }
.key-move-cell.secondary { height: 0.7em; }
.key-move-cell.extra { height: 0.4em; }

Revision as of 07:13, 9 July 2021

.key-moves {
   display: block;
   max-width: 600px;
}

.key-moves tbody {
   display: grid;
   grid-template-columns: auto repeat(5, 1fr);
   grid-auto-rows: auto;
   align-items: center;
   gap: 2px;
}

.key-moves tr {
   display: contents;
}

.key-moves td:first-of-type {
   text-align: center;
   grid-column: 1;
}

.key-moves th {
   overflow: hidden;
   white-space: nowrap;
   text-overflow: '·';
}

.key-move-cell {
   width: 30px;
}

@supports (display: grid) {
   .key-moves .key-move-cell {
      width: 100%;
   }
}

.key-move-cell.primary { height: 1em; }
.key-move-cell.secondary { height: 0.7em; }
.key-move-cell.extra { height: 0.4em; }