MediaWiki:Common.css: Difference between revisions

MediaWiki interface page
(Minimal-working code for Infobox (hopefully))
 
(Undo revision 162 by Lionir (talk))
Tag: Undo
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* CSS placed here will be applied to all skins */
.infobox {
.infobox {
    background: #eee;
  border-radius:var(--border-radius--medium);
    border: 1px solid #aaa;
  background-color:var(--color-surface-2);
    float: right;
  padding: 20px;
    margin: 0 0 1em 1em;
  width: 100%;
    padding: 1em;
  margin-top: 1em;
    width: 400px;
}
}
.infobox-title {
.infobox-title {
    font-size: 2em;
  color:var(--color-base--emphasized);
    text-align: center;
  font-weight:var(--font-weight-semibold);
  font-size:calc(var(--font-size-h3)*1.5);
  text-align:center;
}
}
.infobox-image {
.infobox-image {
    text-align: center;
  max-width:100%;
  height:auto;
}
.infobox-table td {
  padding-block:3px;
}
}
.infobox-table th {
.infobox-table th {
    text-align: right;
  color:var(--color-base--subtle);
    vertical-align: top;
  font-weight:var(--font-weight-semibold);
    width: 120px;
  text-align:left;
  padding-right: 15px;
}
.infobox-table th {
  width: 40%;
}
}
.infobox-table td {
.infobox-table td {
     vertical-align: top;
  width: 60%;
}
 
@media screen and (min-width:720px) {
  .infobox {
     max-width: 400px;
    float:right;
  }
}
}

Latest revision as of 21:32, 21 January 2024

.infobox {
  border-radius:var(--border-radius--medium);
  background-color:var(--color-surface-2);
  padding: 20px;
  width: 100%;
  margin-top: 1em;
}
.infobox-title {
  color:var(--color-base--emphasized);
  font-weight:var(--font-weight-semibold);
  font-size:calc(var(--font-size-h3)*1.5);
  text-align:center;
}
.infobox-image {
  max-width:100%;
  height:auto;
}
.infobox-table td {
  padding-block:3px;
}
.infobox-table th {
  color:var(--color-base--subtle);
  font-weight:var(--font-weight-semibold);
  text-align:left;
  padding-right: 15px;
}
.infobox-table th {
  width: 40%;
}
.infobox-table td {
  width: 60%;
}

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