Difference between revisions of "Template:Colored box/style.css"

From Forge Community Wiki
(remove the border-left-style by default)
(suppress margin for the first child of the content div for the colored box (this is so the paragraph element doesn't expand the space between title and content))
Line 19: Line 19:
 
}
 
}
  
.mw-tpl-colorbox-title p {
+
.mw-tpl-colorbox-title p:first-child, .mw-tpl-colorbox-content p:first-child {
 
  margin: 0;
 
  margin: 0;
 
}
 
}

Revision as of 21:32, 14 February 2021

.mw-tpl-colorbox {
 box-sizing: border-box;
 border-radius: 0.1em;
 border-color: transparent;
 border-left-width: 0.5em;
 box-shadow: 0 0 0.2em #cccccc;
 background: inherit;
 width: 60%;
 margin: 0.5em auto;
 display: flex;
 flex-flow: row nowrap;
 align-items: center;
}

.mw-tpl-colorbox-title {
 border-radius: 0.1em 0.1em 0 0;
 font-size: 120%;
 padding: 0.25em 0.6em 0.1em 0.6em;
}

.mw-tpl-colorbox-title p:first-child, .mw-tpl-colorbox-content p:first-child {
 margin: 0;
}

.mw-tpl-colorbox-icon {
 opacity: 0.8;
 margin: 0.25em;
 margin-left: 0.8em;
}

.mw-tpl-colorbox-title-corner {
 float: right;
 font-size: 0.7em;
}

.mw-tpl-colorbox-content {
 padding: 0.3em 0.75em 0.3em 0.75em;
}