PortableInfobox/styles/PortableInfobox.scss

243 lines
4.4 KiB
SCSS
Raw Normal View History

@import 'skins/shared/color';
@import 'skins/shared/mixins/chevron';
2015-06-10 15:16:46 +00:00
@import 'skins/shared/mixins/flexbox';
@import 'skins/shared/mixins/transform';
@import 'extensions/wikia/PortableInfobox/styles/PortableInfoboxVariables';
@import 'extensions/wikia/PortableInfobox/styles/PortableInfoboxMixins';
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) //
.portable-infobox {
2015-10-20 19:52:33 +00:00
@include wikiaArticleOverwrites;
2015-07-29 15:49:19 +00:00
// overwrite default article styles for children of data value
.pi-data-value {
2015-07-29 15:49:19 +00:00
> *,
li {
margin: 0;
}
2015-07-29 15:49:19 +00:00
ol,
ul {
list-style-position: inside;
}
li {
line-height: 19px;
}
}
}
2015-06-19 13:03:11 +00:00
@include commonElementsStyles;
@include individualElementsStyles;
// ********** Special styles for HORIZONTAL group ********** //
.pi-horizontal-group {
border-spacing: 0;
table-layout: fixed;
text-align: center;
width: 100%;
.pi-header {
text-align: left;
}
.pi-horizontal-group-item {
vertical-align: top;
2015-06-19 13:03:11 +00:00
&:not(:first-child) {
border-left-style: solid;
border-left-width: 1px;
2015-06-11 17:03:57 +00:00
}
}
.pi-data-label {
padding-bottom: 0;
2015-06-19 13:03:11 +00:00
}
}
2015-06-02 11:09:25 +00:00
2017-01-10 14:24:39 +00:00
// ********** Special styles for SMART WRAP group (row-items attribute provided) ********** //
.pi-smart-group {
2017-01-12 13:11:46 +00:00
display: flex;
flex-direction: column;
2017-01-10 14:24:39 +00:00
text-align: center;
2017-01-12 13:11:46 +00:00
.pi-smart-data-label,
.pi-smart-data-value {
box-sizing: border-box;
flex-basis: auto;
padding: 0;
}
2017-01-12 13:11:46 +00:00
}
2017-01-12 13:11:46 +00:00
.pi-smart-group-body {
display: flex;
}
2017-01-12 13:11:46 +00:00
.pi-smart-group-head {
align-items: center;
display: flex;
2017-01-10 14:24:39 +00:00
}
// ********** Overwrite default infobox styles for STACKED layout type ********** //
.pi-layout-stacked {
.pi-data {
display: block;
}
.pi-data-value {
padding-left: $infobox-item-margin * 2;
}
}
2015-10-26 17:09:49 +00:00
// ********** Collapsible groups ********** //
2017-01-11 13:43:45 +00:00
.pi-collapse .pi-header:first-child {
@include collapsibleChevron;
}
2015-10-26 17:09:49 +00:00
.pi-collapse-closed {
border-bottom: none;
2017-01-11 13:43:45 +00:00
.pi-header:first-child::after {
@include transform-rotate(135deg);
margin-top: -($infobox-chevron-size / 2);
}
2015-10-26 17:09:49 +00:00
> *:nth-child(n+2) {
display: none;
}
.pi-horizontal-group {
thead,
tbody {
display: none;
}
}
}
// ********** Image Collection ********** //
ul.pi-image-collection-tabs {
list-style: none;
2015-10-22 17:38:39 +00:00
margin: 0 -1px -1px 0;
2015-10-22 17:25:40 +00:00
overflow: hidden;
2015-10-22 17:38:39 +00:00
padding: 0;
text-align: center;
li {
2015-10-22 17:25:40 +00:00
border: 1px solid $infobox-section-header-background;
box-sizing: border-box;
cursor: pointer;
display: inline-block;
2015-10-22 17:38:39 +00:00
margin: -1px -1px 0 0;
max-width: 50%;
2015-10-20 19:52:33 +00:00
overflow: hidden;
text-overflow: ellipsis;
vertical-align: bottom;
white-space: nowrap;
&.current {
background: $infobox-section-header-background;
font-weight: bold;
}
}
}
.pi-image-collection-tab-content {
background-color: $infobox-background;
display: none;
.video-thumbnail {
display: block;
}
}
.pi-image-collection-tab-content.current {
display: inherit;
}
// ********** Error handling styles ********** //
2015-06-10 15:16:46 +00:00
.WikiaArticle {
.pi-error-info {
2015-06-10 15:16:46 +00:00
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;
}
.pi-debug {
2015-06-10 15:16:46 +00:00
background-color: $color-unified-module-background;
font-family: monospace;
list-style: none;
margin: 0;
width: 100%;
li {
margin: 0;
}
.error {
font-size: inherit;
}
}
}
.pi-debug-line {
2015-06-10 15:16:46 +00:00
@include flexbox();
}
.pi-debug-line-number,
.pi-debug-line-code {
2015-06-10 15:16:46 +00:00
box-sizing: border-box;
}
2015-06-02 11:09:25 +00:00
.pi-debug-line-number {
2015-06-10 15:16:46 +00:00
@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-07-31 11:04:59 +00:00
.pi-debug-error-message {
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-07-31 11:04:59 +00:00
.pi-debug-error-message-item {
2015-06-10 15:16:46 +00:00
margin: $infobox-item-margin 0;
}
2015-06-02 11:18:41 +00:00
}