Difference between revisions of "MediaWiki:Common.css"

396 bytes added ,  14:43, 3 October 2020
Add initial ambox styles.
m (Add missing brace.)
(Add initial ambox styles.)
Line 3: Line 3:
 
/* Boxes, boxes everywhere */
 
/* Boxes, boxes everywhere */
 
/* These colors are purposefully a bit washed out. We want to provide a hint that's distinctive enough to imply a new section or element, whilst not overpowering everything else or creating undue emphasis. Could be done way easier with CSS Custom Properties. Boo IE! Boo! */
 
/* These colors are purposefully a bit washed out. We want to provide a hint that's distinctive enough to imply a new section or element, whilst not overpowering everything else or creating undue emphasis. Could be done way easier with CSS Custom Properties. Boo IE! Boo! */
 +
 
.box {
 
.box {
 
display: block;
 
display: block;
Line 10: Line 11:
 
background-color: hsl(0, 0%, 100%);
 
background-color: hsl(0, 0%, 100%);
 
}
 
}
 +
 +
/* Box color variants. */
  
 
.box.gray {
 
.box.gray {
Line 76: Line 79:
 
.box.pink .box { background-color: hsl(334, 71.5%, 93%); }
 
.box.pink .box { background-color: hsl(334, 71.5%, 93%); }
 
.box.pink .header { background-color: hsl(334, 71.5%, 50%); }
 
.box.pink .header { background-color: hsl(334, 71.5%, 50%); }
 +
 +
/* Amboxes (article message box) */
 +
 +
.box.ambox {
 +
max-width: 50em;
 +
margin-right: auto;
 +
margin-left: auto;
 +
padding: .5em 1em;
 +
border-left-width: 10px;
 +
line-height: 1.25;
 +
}
 +
.box.ambox + .box.ambox { margin-top: -1px; }
 +
.box.ambox.section { /* Smaller, section-specific variant */
 +
max-width: 20em;
 +
margin-left: 0;
 +
padding: 0 .5em;
 +
font-size: smaller;
 +
}