User:SnorlaxMonster/Infobox/styles.css: Difference between revisions

From Bulbapedia, the community-driven Pokémon encyclopedia.
Jump to navigationJump to search
mNo edit summary
No edit summary
Line 21: Line 21:
}
}


/* Title area */
.common-infobox-title-tall {
.common-infobox-title-tall {
   padding: 3px;
   padding: 3px;
Line 53: Line 54:
}
}


/* Image area */
.common-infobox-image {
.common-infobox-image {
   text-align: center;
   text-align: center;
Line 65: Line 67:
}
}


/* Tables */
.common-infobox table {
.common-infobox table {
  border-collapse: collapse;
   /* Undo Minerva table styling */
   /* Undo Minerva table styling */
   display: table;
   display: table;
  border-collapse: separate;
   margin: unset;
   margin: unset;
}
}
Line 80: Line 84:
   border-top-left-radius: 10px;
   border-top-left-radius: 10px;
   border-top-right-radius: 10px;
   border-top-right-radius: 10px;
}
.common-infobox table th,
.common-infobox table td {
  padding: 2px;
  border: 1px solid black;
}
}


.common-infobox table th {
.common-infobox table th {
  padding: 2px;
   background-color: rgba(255, 255, 255, 0.35);
   background-color: rgba(255, 255, 255, 0.35);
   text-align: right;
   text-align: right;
Line 90: Line 99:


.common-infobox table td {
.common-infobox table td {
  padding: 2px;
   background-color: #FFF;
   background-color: #FFF;
}
}


/* Hide external table borders */
.common-infobox table tr:first-child th,
.common-infobox table tr:first-child td
{
  border-top: none;
}
.common-infobox table tr:last-child th,
.common-infobox table tr:last-child td {
  border-bottom: none;
}
.common-infobox table tr th:first-child,
.common-infobox table tr td:first-child {
  border-left: none;
}
.common-infobox table tr th:last-child,
.common-infobox table tr td:last-child {
  border-right: none;
}
/* Round corner cells */
.common-infobox table tr:first-child th:first-child {
.common-infobox table tr:first-child th:first-child {
   border-top-left-radius: 10px;
   border-top-left-radius: 10px;

Revision as of 07:22, 11 March 2024

.common-infobox {
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-radius: 10px;
  border: 3px solid rgba(0, 0, 0, 0.35);
}

@media all and (min-width:720px) {
  .common-infobox {
    float: right;
    width: 400px;
  }
}

@media all and (max-width:719px) {
  .common-infobox {
    width: auto;
  }
}

/* Title area */
.common-infobox-title-tall {
  padding: 3px;
  text-align: center;
  background-color: rgba(255, 255, 255, 0.35);
  border-radius: 10px;
}

.common-infobox-title-compact {
  padding: 3px;
  text-align: center;
  background-color: rgba(255, 255, 255, 0.35);
  border-radius: 10px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  align-items: center;
}

.common-infobox-title-en {
  font-size: large;
  font-weight: bold;
  grid-row: span 2;
}

.common-infobox-title-ja {
  font-weight: bold;
}

.common-infobox-title-trans {
  font-size: smaller;
  font-style: italic;
}

/* Image area */
.common-infobox-image {
  text-align: center;
  background-color: #FFF;
  padding-top: 5px;
  padding-bottom: 2px;
  border-radius: 10px;
}

.common-infobox-image-caption {
  font-size: smaller;
}

/* Tables */
.common-infobox table {
  border-collapse: collapse;

  /* Undo Minerva table styling */
  display: table;
  margin: unset;
}

.common-infobox table caption {
  margin: 0px 20px;
  text-align: center;
  color: #FFF;
  font-weight: bold;
  background-color: rgba(0, 0, 0, 0.35);
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.common-infobox table th,
.common-infobox table td {
  padding: 2px;
  border: 1px solid black;
}

.common-infobox table th {
  background-color: rgba(255, 255, 255, 0.35);
  text-align: right;
  width: 50%;
}

.common-infobox table td {
  background-color: #FFF;
}

/* Hide external table borders */
.common-infobox table tr:first-child th,
.common-infobox table tr:first-child td
{
  border-top: none;
}

.common-infobox table tr:last-child th,
.common-infobox table tr:last-child td {
  border-bottom: none;
}

.common-infobox table tr th:first-child,
.common-infobox table tr td:first-child {
  border-left: none;
}

.common-infobox table tr th:last-child,
.common-infobox table tr td:last-child {
  border-right: none;
}


/* Round corner cells */
.common-infobox table tr:first-child th:first-child {
  border-top-left-radius: 10px;
}

.common-infobox table tr:first-child td:last-child {
  border-top-right-radius: 10px;
}

.common-infobox table tr:last-child th:first-child {
  border-bottom-left-radius: 10px;
}

.common-infobox table tr:last-child td:last-child {
  border-bottom-right-radius: 10px;
}