Make PI styling more responsive

This commit is contained in:
Luqgreg 2018-08-01 12:48:50 +02:00
parent d7d3906ff1
commit 57f053f803

View file

@ -11,57 +11,62 @@
background: var(--pi-background); background: var(--pi-background);
clear: right; clear: right;
float: right; float: right;
font-size: .85em;
margin: 0 0 var(--pi-margin) var(--pi-margin); margin: 0 0 var(--pi-margin) var(--pi-margin);
width: var(--pi-width); width: var(--pi-width);
.pi-border-color {
border-color: var(--pi-border-color);
}
.pi-secondary-background {
background-color: var(--pi-secondary-background);
}
.pi-secondary-font {
margin: 0;
padding: 0;
}
.pi-item-spacing {
padding: var(--pi-item-spacing);
}
.pi-title {
border: 0;
margin: 0;
font-family: inherit;
font-size: 1.75em;
line-height: 1.5;
}
.pi-header { .pi-header {
border: 0; border: 0;
margin: 0; margin: 0;
font-family: inherit; font-family: inherit;
font-size: 1.2em;
font-weight: bold;
line-height: 1.3;
} }
.pi-title { .pi-image {
border: 0;
margin: 0; margin: 0;
font-size: 18px; max-width: 100%;
line-height: 28px; text-align: center;
} }
.pi-data-label { .pi-data-label {
padding-top: 0; font-size: inherit;
line-height: inherit;
} }
.pi-data-value { .pi-data-value {
>* { >:not(ul), li {
margin: 0; margin: 0;
} }
li { ol {
margin: 0;
line-height: 19px;
}
ol, ul {
list-style-position: inside; list-style-position: inside;
} }
} }
>.pi-item:last-child { >.pi-item:last-child {
border-bottom: 0; border-bottom: 0;
} }
.pi-secondary-font {
font-size: 12px;
font-weight: bold;
line-height: 18px;
margin-top: 0;
}
.pi-item-spacing {
padding: var(--pi-item-spacing);
}
} }
.pi { .pi {
&-secondary-background {
background-color: var(--pi-secondary-background);
}
&-border-color {
border-color: var(--pi-border-color);
}
&-image { &-image {
text-align: center;
margin: 0;
&-thumbnail{ &-thumbnail{
max-width: var(--pi-width); max-width: var(--pi-width);
height: auto; height: auto;
@ -105,9 +110,8 @@
-ms-hyphens: auto; -ms-hyphens: auto;
hyphens: auto; hyphens: auto;
color: #808080; color: #808080;
font-size: 12px; font-size: 1em;
font-style: italic; font-style: italic;
text-align: left;
word-wrap: break-word; word-wrap: break-word;
} }
&-data { &-data {
@ -139,19 +143,17 @@
word-wrap: break-word; word-wrap: break-word;
} }
&-value { &-value {
-ms-flex: 1;
-webkit-flex: 1;
-moz-flex: 1;
flex: 1;
-webkit-hyphens: auto; -webkit-hyphens: auto;
-moz-hyphens: auto; -moz-hyphens: auto;
-ms-hyphens: auto; -ms-hyphens: auto;
hyphens: auto; hyphens: auto;
font-size: 12px;
line-height: 18px;
padding-left: 0; padding-left: 0;
word-break: break-word; word-break: break-word;
&:not(:first-child) { &:not(:first-child) {
-ms-flex-preferred-size: 180px;
-webkit-flex-basis: 180px;
-moz-flex-basis: 180px;
flex-basis: 180px;
padding-left: 10px; padding-left: 10px;
} }
} }
@ -171,6 +173,9 @@
.pi-header { .pi-header {
text-align: left; text-align: left;
} }
thead + tbody .pi-data-value {
padding-top: 0;
}
.pi-horizontal-group-item { .pi-horizontal-group-item {
vertical-align: top; vertical-align: top;
&:not(:first-child) { &:not(:first-child) {
@ -184,11 +189,7 @@
} }
&-smart { &-smart {
&-data { &-data {
&-label:not(:first-child) { &-label:not(:first-child),
border-color: var(--pi-border-color);
border-left-style: solid;
border-left-width: 1px;
}
&-value:not(:first-child) { &-value:not(:first-child) {
border-color: var(--pi-border-color); border-color: var(--pi-border-color);
border-left-style: solid; border-left-style: solid;
@ -204,11 +205,14 @@
&:last-child { &:last-child {
border-bottom: 0; border-bottom: 0;
} }
&-body {
display: flex;
}
&-head { &-head {
display: flex; display: flex;
& + .pi-smart-group-body .pi-data-value {
padding-top: 0;
}
}
&-body {
display: flex;
} }
.pi-smart-data-label { .pi-smart-data-label {
padding-bottom: 0; padding-bottom: 0;
@ -225,13 +229,14 @@
.pi-data { .pi-data {
display: block; display: block;
} }
.pi-data-value { .pi-data-value:not(:only-child) {
padding-left: 10px; padding-left: 10px;
} }
} }
&-collapse {
.pi-header { }
&:first-child { @media screen and (min-width: 720px) {
.pi-collapse .pi-header:first-child {
padding-right: 25px; padding-right: 25px;
position: relative; position: relative;
&::after { &::after {
@ -250,8 +255,7 @@
margin-top: -3px; margin-top: -3px;
} }
} }
} .pi-collapse-closed {
&-closed {
.pi-header:first-child::after { .pi-header:first-child::after {
transform: rotate(135deg); transform: rotate(135deg);
-webkit-transform: rotate(135deg); -webkit-transform: rotate(135deg);
@ -271,8 +275,48 @@
} }
} }
} }
}
@media screen and (max-width: 720px) {
.portable-infobox {
float: none;
width: initial;
font-size: initial;
margin: 0;
.skin-minerva & {
margin: 0 -16px;
}
.pi-title {
text-align: center;
}
} }
} }
.skin-minerva {
.pi-caption {
margin: var(--pi-item-spacing);
}
.pi-horizontal-group {
display: table;
margin: 0;
width: 100% !important;
.pi-header {
display: table-caption;
}
}
.pi-navigation {
box-sizing: border-box;
width: 100%;
float: none;
}
}
/* PI errors */
p.pi-error-info { p.pi-error-info {
background-color: #f33; background-color: #f33;
color: #fff; color: #fff;