FIx row view chart on desktop
This commit is contained in:
1 parent
c87c429f28
commit
6802d6664a
1 file changed
+23
-18
@@ -260,7 +260,8 @@
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
<!-- Metric rows -->
|
||||
<!-- Metric rows + radar wrapper -->
|
||||
<div class="metrics-wrap" class:single={singleChamber !== null}>
|
||||
<div class="rows" class:single={singleChamber !== null}>
|
||||
{#each metrics as m (m.key)}
|
||||
<div class="row" class:single={singleChamber !== null}>
|
||||
@@ -371,6 +372,7 @@
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</section>
|
||||
|
||||
@@ -668,17 +670,21 @@
|
||||
|
||||
/* Single chamber desktop: side-by-side sparklines and radar */
|
||||
@media (min-width: 901px) {
|
||||
.rows.single {
|
||||
position: relative;
|
||||
padding-right: 210px; /* make room for radar column */
|
||||
.metrics-wrap.single {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: stretch;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.rows.single :global(.row-radar) {
|
||||
position: absolute;
|
||||
top: 12px;
|
||||
right: 0;
|
||||
.metrics-wrap.single .rows.single {
|
||||
flex: 1;
|
||||
min-width: 0; /* allow flex item to shrink below content size */
|
||||
}
|
||||
|
||||
.metrics-wrap.single .row-radar.single {
|
||||
width: 190px;
|
||||
height: calc(100% - 24px);
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border-bottom: none;
|
||||
@@ -686,12 +692,12 @@
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.row-radar.single .row-label {
|
||||
.metrics-wrap.single .row-radar.single .row-label {
|
||||
justify-content: center;
|
||||
padding: 8px 0;
|
||||
}
|
||||
|
||||
.row-radar.single .cell-radar {
|
||||
.metrics-wrap.single .row-radar.single .cell-radar {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -701,7 +707,7 @@
|
||||
}
|
||||
|
||||
/* Calibrating placeholder fits the tighter space */
|
||||
.row-radar.single .calibrating {
|
||||
.metrics-wrap.single .row-radar.single .calibrating {
|
||||
min-height: 0;
|
||||
max-width: none;
|
||||
padding: 8px;
|
||||
@@ -735,13 +741,12 @@
|
||||
}
|
||||
|
||||
/* Reset single chamber side-by-side on mobile */
|
||||
.rows.single {
|
||||
padding-right: 0 !important;
|
||||
.metrics-wrap.single {
|
||||
display: block;
|
||||
}
|
||||
.rows.single :global(.row-radar) {
|
||||
position: static !important;
|
||||
width: auto !important;
|
||||
height: auto !important;
|
||||
.metrics-wrap.single .row-radar.single {
|
||||
width: auto;
|
||||
margin-top: 12px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user