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

From Bulbapedia, the community-driven Pokémon encyclopedia.
Jump to navigationJump to search
(SnorlaxMonster changed the content model of the page User:SnorlaxMonster/Infobox/styles.css from "CSS" to "Sanitized CSS")
Tag: content model change
m (Enforce plainlinks in table captions and other subheaders)
 
(9 intermediate revisions by the same user not shown)
Line 8: Line 8:
}
}


/* Width depends on window size */
@media all and (min-width:720px) {
@media all and (min-width:720px) {
   .common-infobox {
   .common-infobox {
Line 21: Line 22:
}
}


.common-infobox-title-tall {
/* Title area */
.common-infobox .infobox-title-tall {
   padding: 3px;
   padding: 3px;
   text-align: center;
   text-align: center;
Line 28: Line 30:
}
}


.common-infobox-title-compact {
.common-infobox .infobox-title-compact {
   padding: 3px;
   padding: 3px;
   text-align: center;
   text-align: center;
Line 38: Line 40:
}
}


.common-infobox-title-en {
.common-infobox .infobox-title-en {
   font-size: large;
   font-size: large;
   font-weight: bold;
   font-weight: bold;
Line 44: Line 46:
}
}


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


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


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


.common-infobox-image-caption {
.common-infobox .infobox-image > *:not(.infobox-image-caption) {
   font-size: smaller;
  margin: 0.5rem;
}
 
.common-infobox .infobox-image-caption {
   font-size:smaller;
  margin-top: -0.4rem;
}
}


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


.common-infobox table caption {
.common-infobox table caption,
.common-infobox .subheader {
   margin: 0px 20px;
   margin: 0px 20px;
   text-align: center;
   text-align: center;
Line 81: Line 89:
   border-top-left-radius: 10px;
   border-top-left-radius: 10px;
   border-top-right-radius: 10px;
   border-top-right-radius: 10px;
}
.common-infobox table caption a,
.common-infobox .subheader a {
  color: #FFF;
}
}


.common-infobox table th {
.common-infobox table th {
   padding: 1px;
   padding: 2px;
  border: 1px solid black;
   background-color: rgba(255, 255, 255, 0.35);
   background-color: rgba(255, 255, 255, 0.35);
   text-align: right;
   text-align: right;
   width: 50%;
   width: 50%;
}
.common-infobox table th a {
  color: #000;
}
}


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


.common-infobox table tr:first-child th:first-child {
/* Hide external table borders */
   border-top-left-radius: 5px;
.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 td:first-child {
  border-top-left-radius: 10px;
}
.common-infobox table tr:first-child th:last-child,
.common-infobox table tr:first-child td:last-child {
.common-infobox table tr:first-child td:last-child {
   border-top-right-radius: 5px;
   border-top-right-radius: 10px;
}
}


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


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

Latest revision as of 11:50, 15 September 2024

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

/* Width depends on window size */
@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 .infobox-title-tall {
  padding: 3px;
  text-align: center;
  background-color: rgba(255, 255, 255, 0.35);
  border-radius: 10px;
}

.common-infobox .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 .infobox-title-en {
  font-size: large;
  font-weight: bold;
  grid-row: span 2;
}

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

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

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

.common-infobox .infobox-image > *:not(.infobox-image-caption) {
  margin: 0.5rem;
}

.common-infobox .infobox-image-caption {
  font-size:smaller;
  margin-top: -0.4rem;
}

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

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

.common-infobox table caption,
.common-infobox .subheader {
  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 caption a,
.common-infobox .subheader a {
  color: #FFF;
}

.common-infobox table th {
  padding: 2px;
  border: 1px solid black;
  background-color: rgba(255, 255, 255, 0.35);
  text-align: right;
  width: 50%;
}

.common-infobox table th a {
  color: #000;
}

.common-infobox table td {
  padding: 2px;
  border: 1px solid black;
  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 td:first-child {
  border-top-left-radius: 10px;
}

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

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

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