@import 'skins/shared/color'; @import 'skins/shared/mixins/columns'; @import 'skins/shared/mixins/flexbox'; $infobox-width: 270px; // temporary value used to mach with Khal Drogo Infobox $infobox-margin: 15px; $infobox-item-margin: 5px; $infobox-background: mix($color-page, $color-links, 90%); @if ($is-dark-wiki) { $infobox-background: mix($color-page, $color-links, 85%); } $infobox-section-header-background: mix($color-page, $color-links, 75%); .portable-infobox { background-color: $infobox-background; clear: right; float: right; margin: 0 0 $infobox-margin $infobox-margin; width: $infobox-width; // TODO: experimental wide infobox styles (remove or refactor) &.wide-infobox { @include column-count(3); @include column-gap($infobox-item-margin * 2); clear: both; float: none; margin: 0; width: 100%; .portable-infobox-item:not(.item-type-title) { @include column-break-inside(avoid); } .item-type-title { @include column-span(all); } } .portable-infobox-item-margins { padding: $infobox-item-margin $infobox-item-margin * 4 $infobox-item-margin $infobox-item-margin * 2; } .portable-infobox-image-wrapper { text-align: center; } .portable-infobox-image-caption { color: $color-alternate-text; font-size: 12px; font-style: italic; text-align: left; } .portable-infobox-header-background { background-color: $infobox-section-header-background; } .portable-infobox-header-font { font-size: 12px; font-weight: bold; line-height: 18px; margin-top: 0; } .portable-infobox-header, .portable-infobox-title { border: 0; margin: 0; padding: 0; } .portable-infobox-title { font-size: 18px; line-height: 28px; } .item-type-key-val:not(:last-of-type) { border-bottom: 1px solid $infobox-section-header-background; } .portable-infobox-item-label { margin-top: 0; } .portable-infobox-item-value { padding-left: $infobox-item-margin * 2; // experiment with removing margins on all children of data value > * { margin: 0; } ul, ol { list-style-position: inside; } } .portable-infobox-comparison { border-collapse: collapse; width: 100%; } .portable-infobox-comparison-set { display: block; } .portable-infobox-comparison-set-header { box-sizing: border-box; display: block; text-align: left; width: 100%; } .portable-infobox-comparison-item { box-sizing: border-box; vertical-align: top; width: $infobox-width / 2; &:first-of-type { border-right: 1px solid $infobox-section-header-background; } .item-type-key-val { border-bottom: 0; padding-right: $infobox-item-margin * 2; } } .group-layout-horizontal { &.item-type-group { display: table; table-layout: fixed; width: 100%; } .item-type-header { display: table-caption; } .item-type-key-val { border-bottom: 0; display: table-cell; padding: $infobox-item-margin; text-align: center; } .item-type-key-val:not(:last-of-type) { border-right: 1px solid $infobox-section-header-background; } .portable-infobox-item-label { overflow: hidden; vertical-align: top; white-space: nowrap; } .portable-infobox-item-value { padding-left: 0; } } } .portable-infobox-layout-tabular { > .item-type-key-val, .item-type-group .item-type-key-val { @include flexbox; @include flex-direction(row); box-sizing: border-box; overflow: hidden; width: 100%; .portable-infobox-item-label { @include flex-basis($infobox-width / 3); line-height: 18px; margin-top: inherit; } .portable-infobox-item-value { @include flex-basis($infobox-width * 2 / 3); font-size: 14px; line-height: 20px; } } }