Skip to content

Commit ad5e10b

Browse files
author
ldkud50
committed
fix: proper row layout matching button-card style
1 parent 204371b commit ad5e10b

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

dist/solar-flow-card.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,10 @@ class SolarFlowCard extends HTMLElement {
123123
return `
124124
<div class="stat-btn" style="border-color:${C};background:${C}14;">
125125
<div class="stat-shimmer" style="background:linear-gradient(90deg,transparent,${C}80,transparent)"></div>
126-
<svg viewBox="0 0 24 24" width="28" height="28" style="flex-shrink:0"><path d="${icon}" fill="${C}"/></svg>
126+
<div class="stat-icon"><svg viewBox="0 0 24 24" width="28" height="28"><path d="${icon}" fill="${C}"/></svg></div>
127127
<div class="stat-text">
128128
<div class="stat-val" style="color:${C}">${val}</div>
129-
<div class="stat-lbl">${label}</div>
129+
<div class="stat-lbl" style="color:${C}">${label}</div>
130130
</div>
131131
</div>
132132
`;
@@ -246,16 +246,17 @@ class SolarFlowCard extends HTMLElement {
246246
.stat-btn{
247247
flex:1;border-radius:12px;border:1px solid;
248248
padding:6px 6px 6px 14px;display:flex;flex-direction:row;
249-
align-items:center;gap:8px;position:relative;overflow:hidden;
249+
align-items:center;gap:10px;position:relative;overflow:hidden;
250250
box-sizing:border-box;min-width:0;height:80px;
251251
}
252-
.stat-text{display:flex;flex-direction:column;gap:2px;min-width:0;}
252+
.stat-icon{flex-shrink:0;display:flex;align-items:center;}
253+
.stat-text{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1;}
253254
.stat-shimmer{
254255
position:absolute;top:0;left:0;right:0;height:1px;
255256
animation:shimmer 2.5s linear infinite;pointer-events:none;
256257
}
257258
.stat-val{font-size:${0.82 * sc}em;font-weight:700;font-family:var(--primary-font-family,sans-serif);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
258-
.stat-lbl{font-size:${0.72 * sc}em;color:rgba(255,255,255,0.7);font-family:var(--primary-font-family,sans-serif);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
259+
.stat-lbl{font-size:${0.6 * sc}em;color:rgba(255,255,255,0.7);font-weight:600;font-family:var(--primary-font-family,sans-serif);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;letter-spacing:0.3px;}
259260
</style>
260261
<div class="wrap">
261262
<div class="flow">

0 commit comments

Comments
 (0)