User:Ebrunborg/Common.css

From Bulbapedia, the community-driven Pokémon encyclopedia.
Jump to navigationJump to search

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
/* INFOBOX CSS START ************************************************************************/

/* Main table */

.infobox {
  --radius-1: 10px;
  --radius-2: 7px;
  --radius-3: 5px;
  --radius-4: 3px;

  --space-1: 4px;


  float: right;
  text-align: center;
  width: 33%;
  max-width: 420px;
  padding: 0;
  border-spacing: var(--space-1);
  border-collapse: unset;
  line-height: 1.3em;
  border-radius: var(--radius-1);

  /* Background will be applied in the template */
}

/* Remove margins from all nested tables */
.infobox table,
.infobox tr,
.infobox td,
.infobox th {
  margin: 0px;
  padding: 0px;
}

/* Set all table links to be black */
.infobox a {
  color: black;
}

/* Utility class to add padding to certain tables or content */
.infobox .padded {
  padding: var(--space-1);
}

/* Utility class for table spacing */
.infobox .border-spaced {
  border-spacing: var(--space-1);
  border-collapse: unset;
  margin: 0;
}

/* Utility class for hidden elements */
.infobox .hidden {
  display: none;
}

/* Utitility class for margin-bottom */
.infobox .margin-bottom {
  margin-bottom: var(--space-1);
}

/* Utility classes for radii */
.infobox .radius-4 {
  border-radius: var(--radius-4);
}

/* Image area in top of infobox */
.infobox-images {
  border-spacing: 10px !important;
}

/* Nested tables, with a lighter background */
.infobox .table-group {
  border-radius: var(--radius-2);
  vertical-align: initial;
}

/* Add margin bottom to "headers" in table groups */
.infobox b {
  display: inline-block;
  margin-bottom: var(--space-1);
}

/* Add top margin to table group "headers" if the group NOT padded */
.infobox .table-group > b {
  margin-top: var(--space-1);
  margin-bottom: 0px;
}

/* Add bottom margin to table group "headers" if the group IS padded */
.infobox .table-group.padded > b {
  margin-top: 0;
  margin-bottom: var(--space-1);
}

/* Nested tables or cells with a white background */
.infobox .table-content {
  border-spacing: var(--space-1);
  background-color: white;
  border-radius: var(--radius-3);
  border-collapse: unset;
  margin-top: var(--space-1);
}

/* Remove margin top on the first of several nested tables */
/* The margin is there to separate multiple tables inside a table group */
.infobox .table-content:first-of-type {
  margin-top: 0;
}

/* Boxes that show the type */
.infobox .table-type {
  border-radius: 3px;
  width: 50%;
  padding: 4px 3px 1px;
}

/* Styles for text in type boxes */
.infobox .table-type a {
  color: white;
  text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.4);
}

/* Styles for the gender split bars */
.infobox .gender-bar {
  width: 100%;
  border-radius: 20px;
  display: flex;
  gap: 2px;
  align-items: stretch;
  height: 12px;
  overflow: hidden;
  padding: 0;
}

/* Styles for lists */

ul.bullet-list {
  text-align: left;
  padding-left: 1.5em;
}

ul.bullet-list li ul {
  text-align: left;
  padding-left: 0.5em;
  margin-top: 0.4em;
}

ul.bullet-list li {
  margin-bottom: 0.5em;
}

/* Media queries */

@media screen and (min-width: 720px) {
  table.infobox {
    margin-left: 20px;
  }
}


/* INFOBOX CSS END ************************************************************************/