PortableInfobox/styles/PortableInfobox.scss

238 lines
4.4 KiB
SCSS
Raw Normal View History

@import 'skins/shared/color';
2015-06-10 15:16:46 +00:00
@import 'skins/shared/mixins/flexbox';
@import 'extensions/wikia/PortableInfobox/styles/PortableInfoboxVariables';
2015-06-10 15:16:46 +00:00
.portable-infobox {
background-color: $infobox-background;
clear: right;
float: right;
margin: 0 0 $infobox-margin $infobox-margin;
width: $infobox-width;
// ********** Overwrite styles from article ********** //
// (placing it within portable-infobox class makes it strong enough) //
2015-07-02 08:22:37 +00:00
.portable-infobox-secondary-font {
font-size: 12px;
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;
}
> .portable-infobox-item:last-child {
border-bottom: 0;
}
.portable-infobox-item-label {
margin-bottom: inherit;
margin-top: 0;
}
.portable-infobox-item-value {
> * {
margin: 0;
}
li {
line-height: 19px;
}
}
}
2015-06-19 13:03:11 +00:00
// ********** Default infobox styling ********** //
2015-06-19 13:03:11 +00:00
.portable-infobox-item-margins {
padding: $infobox-item-margin $infobox-item-margin * 4 $infobox-item-margin $infobox-item-margin * 2;
}
2015-06-19 13:03:11 +00:00
.portable-infobox-image-wrapper {
text-align: center;
}
2015-06-19 13:03:11 +00:00
.portable-infobox-image-caption {
color: $color-alternate-text;
font-size: 12px;
font-style: italic;
text-align: left;
}
2015-06-19 13:03:11 +00:00
.portable-infobox-secondary-background {
background-color: $infobox-section-header-background;
}
.portable-infobox-secondary-font {
font-weight: bold;
}
.item-type-key-val:not(:last-of-type),
.item-type-group {
border-bottom: 1px solid $infobox-section-header-background;
}
.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);
}
.portable-infobox-item-value {
font-size: 12px;
line-height: 18px;
padding-left: 0;//Overwritten anyway
&:not(:first-child) {
@include flex-basis($infobox-width * 2 / 3);
padding-left: 10px;
}
// fix styles for children of data value
> * {
margin: 0;
}
ol,
ul {
list-style-position: inside;
}
li {
margin: 0;
}
}
.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;
2015-06-19 13:03:11 +00:00
}
}
2015-06-02 11:09:25 +00:00
// ********** Overwrite default styles for STACKED layout type ********** //
.portable-infobox-layout-stacked {
.item-type-key-val {
display: block;
}
.portable-infobox-item-value {
font-size: 14px;
line-height: 20px;
2015-07-27 14:34:54 +00:00
padding-left: $infobox-item-margin * 2;
}
}
// ********** Error handling styles ********** //
2015-06-10 15:16:46 +00:00
.WikiaArticle {
.portable-infobox-error-info {
background-color: $color-error;
2015-06-10 15:31:29 +00:00
color: $infobox-debug-error-msg-color;
2015-06-10 15:16:46 +00:00
font-size: 18px;
line-height: 28px;
margin: 0;
padding: $infobox-margin * 2 $infobox-debug-line-number-width;
}
.portable-infobox-debug {
background-color: $color-unified-module-background;
font-family: monospace;
list-style: none;
margin: 0;
width: 100%;
li {
margin: 0;
}
.error {
font-size: inherit;
}
}
}
.portable-infobox-debug-line {
@include flexbox();
}
.portable-infobox-debug-line-number,
.portable-infobox-debug-line-code {
box-sizing: border-box;
}
2015-06-02 11:09:25 +00:00
2015-06-10 15:16:46 +00:00
.portable-infobox-debug-line-number {
@include flex-basis($infobox-debug-line-number-width);
@include flex-shrink(0);
padding-left: $infobox-item-margin * 2;
}
2015-06-02 11:18:41 +00:00
2015-06-10 15:16:46 +00:00
.portable-infobox-debug-error-massage {
2015-06-10 15:31:29 +00:00
background-color: $infobox-debug-error-msg-bg;
color: $infobox-debug-error-msg-color;
2015-06-10 15:16:46 +00:00
font-family: Helvetica, Arial, sans-serif;
margin: 20px 0 10px 25px;
padding: $infobox-item-margin * 2 $infobox-item-margin * 3;
position: relative;
width: 400px;
&:before {
2015-06-10 15:31:29 +00:00
border-bottom: $infobox-margin solid $infobox-debug-error-msg-bg;
2015-06-10 15:16:46 +00:00
border-left: $infobox-margin solid transparent;
border-right: $infobox-margin solid transparent;
2015-06-10 15:31:29 +00:00
content: '';
2015-06-10 15:16:46 +00:00
display: block;
height: 0;
left: 25px;
position: absolute;
top: -$infobox-margin;
width: 0;
}
2015-06-02 11:18:41 +00:00
2015-06-10 15:16:46 +00:00
.portable-infobox-debug-error-massage-item {
margin: $infobox-item-margin 0;
}
2015-06-02 11:18:41 +00:00
}
2015-06-03 15:12:43 +00:00