fix chart card initial size
This commit is contained in:
parent
ea2ff64358
commit
5dc8b19912
1 changed files with 11 additions and 4 deletions
|
@ -26,27 +26,34 @@ class AcrariumCard extends PolymerElement {
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.acrarium-card-content-wrapper {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.acrarium-card-content.collapse {
|
.collapse {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
slot[class~="divider"]::slotted(:not(:first-child)) {
|
.divider > ::slotted(:not(:first-child)) {
|
||||||
border-top: 1px solid var(--lumo-contrast-20pct);
|
border-top: 1px solid var(--lumo-contrast-20pct);
|
||||||
margin-top: 0.5em;
|
margin-top: 0.5em;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<slot name="header" class="acrarium-card-header" on-click="handleClick"></slot>
|
<slot name="header" class="acrarium-card-header" on-click="handleClick"></slot>
|
||||||
<slot class$="{{getContentClass(collapse, divider)}}"></slot>
|
<div class$="{{getContentClass(collapse, divider)}}">
|
||||||
|
<slot class="acrarium-card-content"></slot>
|
||||||
|
</div>
|
||||||
`
|
`
|
||||||
}
|
}
|
||||||
|
|
||||||
getContentClass(collapse, divider) {
|
getContentClass(collapse, divider) {
|
||||||
let classes = "acrarium-card-content";
|
let classes = "acrarium-card-content-wrapper";
|
||||||
if (collapse) classes += " collapse";
|
if (collapse) classes += " collapse";
|
||||||
if (divider) classes += " divider";
|
if (divider) classes += " divider";
|
||||||
return classes;
|
return classes;
|
||||||
|
|
Loading…
Reference in a new issue