---
title: "X 归档 2022-03-18"
date: "2022-03-18"
tags:
  - x-archive
  - frontend
  - design
---

<div class="x-arch-meta">5 条动态 · 图 3 · 视频 2</div>
<div class="x-arch-day">
  <div class="x-arch-item">
    <input type="radio" name="xl-1504625789752422405" id="xl-1504625789752422405-zh" class="x-arch-lang-input x-arch-lang-input-zh" checked aria-label="显示译文" /><input type="radio" name="xl-1504625789752422405" id="xl-1504625789752422405-orig" class="x-arch-lang-input x-arch-lang-input-orig" aria-label="显示原文" /><div class="x-arch-head"><img class="x-arch-avatar" src="https://twimg.tweb.xin/twimg/profile_images/1733342770436472832/mBVPTgpn_bigger.jpg" alt="" loading="lazy" referrerpolicy="no-referrer" /><span class="x-arch-kind x-arch-kind-posted" aria-label="发" title="发"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" /><path d="m15 5 4 4" /></svg></span><a class="x-arch-author" href="https://x.com/Steve8708" target="_blank" rel="nofollow noopener" data-name="Steve (Builder.io)" data-avatar="https://twimg.tweb.xin/twimg/profile_images/1733342770436472832/mBVPTgpn_bigger.jpg">@Steve8708</a><span class="x-arch-time">09:08</span><span class="x-arch-lang-switch" role="group" aria-label="切换原文/译文"><label for="xl-1504625789752422405-zh" class="x-arch-lang-opt x-arch-lang-zh">译</label><label for="xl-1504625789752422405-orig" class="x-arch-lang-opt x-arch-lang-orig">原</label></span><a class="x-arch-link" href="https://x.com/Steve8708/status/1504625789752422405" target="_blank" rel="noopener">原推文<svg class="x-arch-ext" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M7 7h10v10" /><path d="M7 17 17 7" /></svg></a></div>
    <div class="x-arch-text x-arch-orig">Note that overflow: clip is not a one size fits all drop in replacement for overflow: hidden (don't project-wide find and replace just yet!), but something to look into for many common use cases<br /><br />Browser support: <a href="https://caniuse.com/?search=overflow%3A%20clip" target="_blank" rel="noopener">https://caniuse.com/?search=overflow%3A%20clip</a><br /><br />Learn more: <a href="https://developer.chrome.com/blog/new-in-chrome-90/#overflow-clip" target="_blank" rel="noopener">https://developer.chrome.com/blog/new-in-chrome-90/#overflow-clip</a></div>
    <div class="x-arch-text x-arch-trans">注意，overflow: clip 并不是 overflow: hidden 的万能直接替代（先别急着全项目查找替换！），但对许多常见用例来说值得研究<br /><br />浏览器支持：<a href="https://caniuse.com/?search=overflow%3A%20clip" target="_blank" rel="noopener">https://caniuse.com/?search=overflow%3A%20clip</a><br /><br />了解更多：<a href="https://developer.chrome.com/blog/new-in-chrome-90/#overflow-clip" target="_blank" rel="noopener">https://developer.chrome.com/blog/new-in-chrome-90/#overflow-clip</a></div>
    <div class="x-arch-media">
      <a href="/cdn-media/x/2022-03/1504625789752422405-1.jpg" target="_blank" rel="noopener"><img class="x-arch-img" src="/cdn-media/x/2022-03/1504625789752422405-1.jpg" alt="@Steve8708 的配图 1/1" loading="lazy" decoding="async" width="1546" height="1248" /></a>
    </div>
  </div>
  <div class="x-arch-item">
    <input type="radio" name="xl-1504628652058677249" id="xl-1504628652058677249-zh" class="x-arch-lang-input x-arch-lang-input-zh" checked aria-label="显示译文" /><input type="radio" name="xl-1504628652058677249" id="xl-1504628652058677249-orig" class="x-arch-lang-input x-arch-lang-input-orig" aria-label="显示原文" /><div class="x-arch-head"><img class="x-arch-avatar" src="https://twimg.tweb.xin/twimg/profile_images/1742332568224047105/32ghsU1D_bigger.jpg" alt="" loading="lazy" referrerpolicy="no-referrer" /><span class="x-arch-kind x-arch-kind-posted" aria-label="发" title="发"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" /><path d="m15 5 4 4" /></svg></span><a class="x-arch-author" href="https://x.com/staringispolite" target="_blank" rel="nofollow noopener" data-name="Jonathan Howard" data-avatar="https://twimg.tweb.xin/twimg/profile_images/1742332568224047105/32ghsU1D_bigger.jpg">@staringispolite</a><span class="x-arch-time">09:19</span><span class="x-arch-lang-switch" role="group" aria-label="切换原文/译文"><label for="xl-1504628652058677249-zh" class="x-arch-lang-opt x-arch-lang-zh">译</label><label for="xl-1504628652058677249-orig" class="x-arch-lang-opt x-arch-lang-orig">原</label></span><a class="x-arch-link" href="https://x.com/staringispolite/status/1504628652058677249" target="_blank" rel="noopener">原推文<svg class="x-arch-ext" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M7 7h10v10" /><path d="M7 17 17 7" /></svg></a></div>
    <div class="x-arch-text x-arch-orig">it’s finally live! this touch typography tool by @schultzschultz_ is magical<br /><br /><a href="https://schultzschultz.com/touchtype" target="_blank" rel="noopener">https://schultzschultz.com/touchtype</a></div>
    <div class="x-arch-text x-arch-trans">终于上线了！@schultzschultz_ 做的这个触控字体工具太神奇了<br /><br /><a href="https://schultzschultz.com/touchtype" target="_blank" rel="noopener">https://schultzschultz.com/touchtype</a></div>
    <video class="x-arch-video" preload="none" playsinline poster="/cdn-media/x/2022-03/1504628652058677249-poster.jpg" src="/cdn-media/x/2022-03/1504628652058677249.m3u8" width="720" height="970" data-duration="19" aria-label="@staringispolite 的视频"></video>
  </div>
  <div class="x-arch-item">
    <input type="radio" name="xl-1504786659061157890" id="xl-1504786659061157890-zh" class="x-arch-lang-input x-arch-lang-input-zh" checked aria-label="显示译文" /><input type="radio" name="xl-1504786659061157890" id="xl-1504786659061157890-orig" class="x-arch-lang-input x-arch-lang-input-orig" aria-label="显示原文" /><div class="x-arch-head"><img class="x-arch-avatar" src="https://twimg.tweb.xin/twimg/profile_images/1758242509652647936/JuXuCA4z_bigger.jpg" alt="" loading="lazy" referrerpolicy="no-referrer" /><span class="x-arch-kind x-arch-kind-liked" aria-label="赞" title="赞"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z" /></svg></span><a class="x-arch-author" href="https://x.com/matthewcp" target="_blank" rel="nofollow noopener" data-name="Matthew Phillips" data-avatar="https://twimg.tweb.xin/twimg/profile_images/1758242509652647936/JuXuCA4z_bigger.jpg">@matthewcp</a><span class="x-arch-time">19:47</span><span class="x-arch-lang-switch" role="group" aria-label="切换原文/译文"><label for="xl-1504786659061157890-zh" class="x-arch-lang-opt x-arch-lang-zh">译</label><label for="xl-1504786659061157890-orig" class="x-arch-lang-opt x-arch-lang-orig">原</label></span><a class="x-arch-link" href="https://x.com/matthewcp/status/1504786659061157890" target="_blank" rel="noopener">原推文<svg class="x-arch-ext" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M7 7h10v10" /><path d="M7 17 17 7" /></svg></a></div>
    <div class="x-arch-text x-arch-orig">A future version of Corset will support setting multiple event listeners of the same type on an element. I don't think you can do this in mainstream frameworks.<br /><br />The proposed syntax looks like this. This borrows from CSS grid, where you can name lines.</div>
    <div class="x-arch-text x-arch-trans">Corset 的未来版本将支持在同一个元素上设置多个同类型的事件监听器。我觉得主流框架都做不到这一点。<br /><br />提议的语法如下。这借鉴了 CSS grid 中给网格线命名的做法。</div>
    <div class="x-arch-media">
      <a href="/cdn-media/x/2026-10/1504786659061157890-1.png" target="_blank" rel="noopener"><img class="x-arch-img" src="/cdn-media/x/2026-10/1504786659061157890-1.png" alt="@matthewcp 的配图 1/1" loading="lazy" decoding="async" width="858" height="708" /></a>
    </div>
  </div>
  <div class="x-arch-item">
    <input type="radio" name="xl-1504793648151601169" id="xl-1504793648151601169-zh" class="x-arch-lang-input x-arch-lang-input-zh" checked aria-label="显示译文" /><input type="radio" name="xl-1504793648151601169" id="xl-1504793648151601169-orig" class="x-arch-lang-input x-arch-lang-input-orig" aria-label="显示原文" /><div class="x-arch-head"><img class="x-arch-avatar" src="https://twimg.tweb.xin/twimg/profile_images/1797295749866164224/1SD8Fh7G_bigger.jpg" alt="" loading="lazy" referrerpolicy="no-referrer" /><span class="x-arch-kind x-arch-kind-liked" aria-label="赞" title="赞"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z" /></svg></span><a class="x-arch-author" href="https://x.com/shadeed9" target="_blank" rel="nofollow noopener" data-name="Ahmad Shadeed" data-avatar="https://twimg.tweb.xin/twimg/profile_images/1797295749866164224/1SD8Fh7G_bigger.jpg">@shadeed9</a><span class="x-arch-time">20:15</span><span class="x-arch-lang-switch" role="group" aria-label="切换原文/译文"><label for="xl-1504793648151601169-zh" class="x-arch-lang-opt x-arch-lang-zh">译</label><label for="xl-1504793648151601169-orig" class="x-arch-lang-opt x-arch-lang-orig">原</label></span><a class="x-arch-link" href="https://x.com/shadeed9/status/1504793648151601169" target="_blank" rel="noopener">原推文<svg class="x-arch-ext" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M7 7h10v10" /><path d="M7 17 17 7" /></svg></a></div>
    <div class="x-arch-text x-arch-orig">CSS Tip 💡<br /><br />Use a dynamic line separator that changes from horizontal to vertical depending on flex-direction. No need for width or height. Just a stretched CSS border!<br /><br />Details: <a href="https://ishadeed.com/article/flexbox-separator/" target="_blank" rel="noopener">https://ishadeed.com/article/flexbox-separator/</a></div>
    <div class="x-arch-text x-arch-trans">CSS 小技巧 💡<br /><br />使用一条动态分隔线，根据 flex-direction 在水平与垂直之间切换。不需要设置宽高，只要一条被拉伸的 CSS border 就行！<br /><br />详情：</div>
    <div class="x-arch-media">
      <a href="/cdn-media/x/2026-10/1504793648151601169-1.jpg" target="_blank" rel="noopener"><img class="x-arch-img" src="/cdn-media/x/2026-10/1504793648151601169-1.jpg" alt="@shadeed9 的配图 1/1" loading="lazy" decoding="async" width="2024" height="1012" /></a>
    </div>
  </div>
  <div class="x-arch-item">
    <input type="radio" name="xl-1504804381258285056" id="xl-1504804381258285056-zh" class="x-arch-lang-input x-arch-lang-input-zh" checked aria-label="显示译文" /><input type="radio" name="xl-1504804381258285056" id="xl-1504804381258285056-orig" class="x-arch-lang-input x-arch-lang-input-orig" aria-label="显示原文" /><div class="x-arch-head"><img class="x-arch-avatar" src="https://twimg.tweb.xin/twimg/profile_images/1541806303114170368/AlJbmHgq_bigger.jpg" alt="" loading="lazy" referrerpolicy="no-referrer" /><span class="x-arch-kind x-arch-kind-liked" aria-label="赞" title="赞"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z" /></svg></span><a class="x-arch-author" href="https://x.com/k1mny" target="_blank" rel="nofollow noopener" data-name="kimny" data-avatar="https://twimg.tweb.xin/twimg/profile_images/1541806303114170368/AlJbmHgq_bigger.jpg">@k1mny</a><span class="x-arch-time">20:58</span><span class="x-arch-lang-switch" role="group" aria-label="切换原文/译文"><label for="xl-1504804381258285056-zh" class="x-arch-lang-opt x-arch-lang-zh">译</label><label for="xl-1504804381258285056-orig" class="x-arch-lang-opt x-arch-lang-orig">原</label></span><a class="x-arch-link" href="https://x.com/k1mny/status/1504804381258285056" target="_blank" rel="noopener">原推文<svg class="x-arch-ext" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M7 7h10v10" /><path d="M7 17 17 7" /></svg></a></div>
    <div class="x-arch-text x-arch-orig">さいころ<br /><a href="https://k1mny.github.io/dice-roll/" target="_blank" rel="noopener">https://k1mny.github.io/dice-roll/</a><br />#threejs</div>
    <div class="x-arch-text x-arch-trans">骰子<br /><br />#threejs</div>
    <video class="x-arch-video" preload="none" playsinline poster="/cdn-media/x/2022-03/1504804381258285056-poster.jpg" src="/cdn-media/x/2026-10/1504804381258285056-video.mp4" width="736" height="700" data-duration="19" aria-label="@k1mny 的视频"></video>
  </div>
</div>
