Skip to content

Commit bd3d1eb

Browse files
committed
Fix WeChat popup social icons not being perfect circles
- Reduce icon size from 32px to 28px so all 6 fit in one row - Add flex-shrink:0, aspect-ratio:1, box-sizing:border-box to guarantee round shape - Add flex-wrap:wrap as fallback for very narrow screens
1 parent 852842a commit bd3d1eb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

css/style.css

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ img{max-width:100%;display:block}
242242
.wechat-fab.active{border-color:var(--green);background:var(--bg3)}
243243
.wechat-fab svg{width:22px;height:22px;fill:currentColor}
244244

245-
.wechat-popup{position:fixed;bottom:140px;right:32px;width:260px;background:var(--card);
245+
.wechat-popup{position:fixed;bottom:140px;right:32px;width:280px;background:var(--card);
246246
border:1px solid var(--border);border-radius:var(--r-lg);padding:16px;z-index:901;
247247
box-shadow:0 12px 48px rgba(0,0,0,.35);opacity:0;visibility:hidden;
248248
transform:translateY(12px) scale(.95);transition:all .3s ease;max-height:calc(100vh - 180px);overflow-y:auto}
@@ -256,11 +256,11 @@ img{max-width:100%;display:block}
256256
.wechat-popup-id{text-align:center;font-size:.76rem;color:var(--text-dim);font-family:var(--mono)}
257257
.wechat-popup-hint{text-align:center;font-size:.72rem;color:var(--text-muted);margin-top:8px;
258258
padding-top:8px;border-top:1px solid var(--border);line-height:1.4}
259-
.popup-social{display:flex;justify-content:center;gap:8px;margin-top:10px}
260-
.popup-social-icon{display:flex;align-items:center;justify-content:center;width:36px;height:36px;
259+
.popup-social{display:flex;justify-content:center;gap:8px;margin-top:10px;flex-wrap:wrap}
260+
.popup-social-icon{display:flex;align-items:center;justify-content:center;width:28px;height:28px;flex-shrink:0;
261261
border-radius:50%;border:1px solid var(--border);background:var(--bg2);color:var(--text-dim);
262-
text-decoration:none;transition:all .2s}
263-
.popup-social-icon svg{width:16px;height:16px;fill:currentColor}
262+
text-decoration:none;transition:all .2s;aspect-ratio:1;box-sizing:border-box}
263+
.popup-social-icon svg{width:13px;height:13px;fill:currentColor}
264264
.popup-social-icon:hover{transform:translateY(-2px);border-color:var(--text-muted)}
265265
.popup-social-icon.tg-icon:hover{color:#2aabee;border-color:#2aabee;background:rgba(42,171,238,.1)}
266266
.popup-social-icon.dc-icon:hover{color:#5865f2;border-color:#5865f2;background:rgba(88,101,242,.1)}

0 commit comments

Comments
 (0)