---
title: "X 归档 2020-02-22"
date: "2020-02-22"
tags:
  - x-archive
  - frontend
---

<div class="x-arch-meta">7 条动态 · 图 4 · 视频 2</div>
<div class="x-arch-day">
  <div class="x-arch-item">
    <input type="radio" name="xl-1230921604852527105" id="xl-1230921604852527105-zh" class="x-arch-lang-input x-arch-lang-input-zh" checked aria-label="显示译文" /><input type="radio" name="xl-1230921604852527105" id="xl-1230921604852527105-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/1677042510839857154/Kq4tpySA_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/adamwathan" target="_blank" rel="nofollow noopener" data-name="Adam Wathan" data-avatar="https://twimg.tweb.xin/twimg/profile_images/1677042510839857154/Kq4tpySA_bigger.jpg">@adamwathan</a><span class="x-arch-time">02:25</span><span class="x-arch-lang-switch" role="group" aria-label="切换原文/译文"><label for="xl-1230921604852527105-zh" class="x-arch-lang-opt x-arch-lang-zh">译</label><label for="xl-1230921604852527105-orig" class="x-arch-lang-opt x-arch-lang-orig">原</label></span><a class="x-arch-link" href="https://x.com/adamwathan/status/1230921604852527105" 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">🏗️ Working on a little responsive confirmation modal for Tailwind UI...</div>
    <div class="x-arch-text x-arch-trans">🏗️ 正在为 Tailwind UI 做一个响应式确认弹窗……</div>
    <video class="x-arch-video" preload="none" playsinline poster="/cdn-media/x/2020-02/1230921604852527105-poster.jpg" src="/cdn-media/x/2026-10/1230921604852527105-video.mp4" width="1048" height="720" data-duration="9" aria-label="@adamwathan 的视频"></video>
  </div>
  <div class="x-arch-item">
    <input type="radio" name="xl-1230960736173731840" id="xl-1230960736173731840-zh" class="x-arch-lang-input x-arch-lang-input-zh" checked aria-label="显示译文" /><input type="radio" name="xl-1230960736173731840" id="xl-1230960736173731840-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/1374778373239681025/Sc9ehtAr_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/_developit" target="_blank" rel="nofollow noopener" data-name="Jason Miller 🦊⚛" data-avatar="https://twimg.tweb.xin/twimg/profile_images/1374778373239681025/Sc9ehtAr_bigger.jpg">@_developit</a><span class="x-arch-time">05:01</span><span class="x-arch-lang-switch" role="group" aria-label="切换原文/译文"><label for="xl-1230960736173731840-zh" class="x-arch-lang-opt x-arch-lang-zh">译</label><label for="xl-1230960736173731840-orig" class="x-arch-lang-opt x-arch-lang-orig">原</label></span><a class="x-arch-link" href="https://x.com/_developit/status/1230960736173731840" 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">How to detect browser support for Module Workers:<br /><br /><a href="https://gist.github.com/developit/5b09dc86c644d76f8fbd8abe294440f2" target="_blank" rel="noopener">https://gist.github.com/developit/5b09dc86c644d76f8fbd8abe294440f2</a><br /><br />(h/t @AndersCan for asking about this!)</div>
    <div class="x-arch-text x-arch-trans">如何检测浏览器对 Module Workers 的支持：<br /><br /><a href="https://gist.github.com/developit/5b09dc86c644d76f8fbd8abe294440f2" target="_blank" rel="noopener">https://gist.github.com/developit/5b09dc86c644d76f8fbd8abe294440f2</a><br /><br />（感谢 @AndersCan 提出这个问题！）</div>
    <div class="x-arch-media">
      <a href="/cdn-media/x/2026-10/1230960736173731840-1.jpg" target="_blank" rel="noopener"><img class="x-arch-img" src="/cdn-media/x/2026-10/1230960736173731840-1.jpg" alt="@_developit 的配图 1/1" loading="lazy" decoding="async" width="1346" height="806" /></a>
    </div>
  </div>
  <div class="x-arch-item">
    <input type="radio" name="xl-1231145252821487616" id="xl-1231145252821487616-zh" class="x-arch-lang-input x-arch-lang-input-zh" checked aria-label="显示译文" /><input type="radio" name="xl-1231145252821487616" id="xl-1231145252821487616-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/1374778373239681025/Sc9ehtAr_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/_developit" target="_blank" rel="nofollow noopener" data-name="Jason Miller 🦊⚛" data-avatar="https://twimg.tweb.xin/twimg/profile_images/1374778373239681025/Sc9ehtAr_bigger.jpg">@_developit</a><span class="x-arch-time">17:14</span><span class="x-arch-lang-switch" role="group" aria-label="切换原文/译文"><label for="xl-1231145252821487616-zh" class="x-arch-lang-opt x-arch-lang-zh">译</label><label for="xl-1231145252821487616-orig" class="x-arch-lang-opt x-arch-lang-orig">原</label></span><a class="x-arch-link" href="https://x.com/_developit/status/1231145252821487616" 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">How to detect browser support for Module Workers:<br /><br /><a href="https://gist.github.com/developit/5b09dc86c644d76f8fbd8abe294440f2" target="_blank" rel="noopener">https://gist.github.com/developit/5b09dc86c644d76f8fbd8abe294440f2</a><br /><br />(h/t @AndersCan for asking about this!)</div>
    <div class="x-arch-text x-arch-trans">如何检测浏览器对 Module Workers 的支持：<br /><br /><a href="https://gist.github.com/developit/5b09dc86c644d76f8fbd8abe294440f2" target="_blank" rel="noopener">https://gist.github.com/developit/5b09dc86c644d76f8fbd8abe294440f2</a><br /><br />（感谢 @AndersCan 提出这个问题！）</div>
    <div class="x-arch-media">
      <a href="/cdn-media/x/2020-02/1231145252821487616-1.jpg" target="_blank" rel="noopener"><img class="x-arch-img" src="/cdn-media/x/2020-02/1231145252821487616-1.jpg" alt="@_developit 的配图 1/1" loading="lazy" decoding="async" width="1346" height="806" /></a>
    </div>
  </div>
  <div class="x-arch-item">
    <input type="radio" name="xl-1231146766474473472" id="xl-1231146766474473472-zh" class="x-arch-lang-input x-arch-lang-input-zh" checked aria-label="显示译文" /><input type="radio" name="xl-1231146766474473472" id="xl-1231146766474473472-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/2043070930071539712/EaMrMk85_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/sebdedeyne" target="_blank" rel="nofollow noopener" data-name="Sebastian De Deyne" data-avatar="https://twimg.tweb.xin/twimg/profile_images/2043070930071539712/EaMrMk85_bigger.jpg">@sebdedeyne</a><span class="x-arch-time">17:20</span><span class="x-arch-lang-switch" role="group" aria-label="切换原文/译文"><label for="xl-1231146766474473472-zh" class="x-arch-lang-opt x-arch-lang-zh">译</label><label for="xl-1231146766474473472-orig" class="x-arch-lang-opt x-arch-lang-orig">原</label></span><a class="x-arch-link" href="https://x.com/sebdedeyne/status/1231146766474473472" 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">`font-variant-numeric: tabular-nums` is one of my favorite CSS properties. It sets numbers as monospace, so they're prettily aligned in tables.<br /><br />Another use case I came across is this little character counter. Notice how much smoother it becomes with tabular nums.</div>
    <div class="x-arch-text x-arch-trans">`font-variant-numeric: tabular-nums` 是我最喜欢的 CSS 属性之一。它把数字设成等宽，让它们在表格里整齐对齐。<br /><br />我遇到的另一个用例是这个小小的字符计数器。注意用上 tabular nums 之后它变得顺眼了多少。</div>
    <video class="x-arch-video" preload="none" playsinline poster="/cdn-media/x/2020-02/1231146766474473472-poster.jpg" src="/cdn-media/x/2020-02/1231146766474473472-video.mp4" width="1394" height="538" data-duration="12" aria-label="@sebdedeyne 的视频"></video>
  </div>
  <div class="x-arch-item">
    <input type="radio" name="xl-1231149127490138117" id="xl-1231149127490138117-zh" class="x-arch-lang-input x-arch-lang-input-zh" checked aria-label="显示译文" /><input type="radio" name="xl-1231149127490138117" id="xl-1231149127490138117-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/2090232066021769216/IwGLjoSy_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/addyosmani" target="_blank" rel="nofollow noopener" data-name="Addy Osmani" data-avatar="https://twimg.tweb.xin/twimg/profile_images/2090232066021769216/IwGLjoSy_bigger.jpg">@addyosmani</a><span class="x-arch-time">17:30</span><span class="x-arch-lang-switch" role="group" aria-label="切换原文/译文"><label for="xl-1231149127490138117-zh" class="x-arch-lang-opt x-arch-lang-zh">译</label><label for="xl-1231149127490138117-orig" class="x-arch-lang-opt x-arch-lang-orig">原</label></span><a class="x-arch-link" href="https://x.com/addyosmani/status/1231149127490138117" 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">JavaScript loading priorities in Chrome: <a href="http://bit.ly/loading-priorities" target="_blank" rel="noopener">http://bit.ly/loading-priorities</a> ~ how do &lt;script&gt;, &lt;script defer&gt;, &lt;link rel=preload&gt; + &lt;script async&gt; &amp; friends load then execute? Useful table.</div>
    <div class="x-arch-text x-arch-trans">Chrome 中 JavaScript 的加载优先级： ~ &lt;script&gt;、&lt;script defer&gt;、&lt;link rel=preload&gt; + &lt;script async&gt; 之类是怎么先加载再执行的？很实用的一张表。</div>
    <div class="x-arch-media">
      <a href="/cdn-media/x/2026-10/1231149127490138117-1.jpg" target="_blank" rel="noopener"><img class="x-arch-img" src="/cdn-media/x/2026-10/1231149127490138117-1.jpg" alt="@addyosmani 的配图 1/1" loading="lazy" decoding="async" width="2048" height="1176" /></a>
    </div>
  </div>
  <div class="x-arch-item">
    <input type="radio" name="xl-1231165158514405377" id="xl-1231165158514405377-zh" class="x-arch-lang-input x-arch-lang-input-zh" checked aria-label="显示译文" /><input type="radio" name="xl-1231165158514405377" id="xl-1231165158514405377-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/952797845534453760/HRhT4f_5_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/mathias" target="_blank" rel="nofollow noopener" data-name="Mathias Bynens" data-avatar="https://twimg.tweb.xin/twimg/profile_images/952797845534453760/HRhT4f_5_bigger.jpg">@mathias</a><span class="x-arch-time">18:33</span><span class="x-arch-lang-switch" role="group" aria-label="切换原文/译文"><label for="xl-1231165158514405377-zh" class="x-arch-lang-opt x-arch-lang-zh">译</label><label for="xl-1231165158514405377-orig" class="x-arch-lang-opt x-arch-lang-orig">原</label></span><a class="x-arch-link" href="https://x.com/mathias/status/1231165158514405377" 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">Another useful tip for memory debugging (not mentioned in the article) is `queryObjects(SomeConstructor)`, which can be used from the DevTools Console: <a href="https://developers.google.com/web/updates/2017/08/devtools-release-notes#query-objects" target="_blank" rel="noopener">https://developers.google.com/web/updates/2017/08/devtools-release-notes#query-objects</a></div>
    <div class="x-arch-text x-arch-trans">另一个好用的内存调试技巧（文章里没提到）是 `queryObjects(SomeConstructor)`，可以在 DevTools 控制台里用：<a href="https://developers.google.com/web/updates/2017/08/devtools-release-notes#query-objects" target="_blank" rel="noopener">https://developers.google.com/web/updates/2017/08/devtools-release-notes#query-objects</a></div>
    <div class="x-arch-media">
      <a href="/cdn-media/x/2026-10/1231165158514405377-1.jpg" target="_blank" rel="noopener"><img class="x-arch-img" src="/cdn-media/x/2026-10/1231165158514405377-1.jpg" alt="@mathias 的配图 1/1" loading="lazy" decoding="async" width="1272" height="1140" /></a>
    </div>
  </div>
  <div class="x-arch-item">
    <input type="radio" name="xl-1231173552851898368" id="xl-1231173552851898368-zh" class="x-arch-lang-input x-arch-lang-input-zh" checked aria-label="显示译文" /><input type="radio" name="xl-1231173552851898368" id="xl-1231173552851898368-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/1695239906/me_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/jaffathecake" target="_blank" rel="nofollow noopener" data-name="Jake Archibald" data-avatar="https://twimg.tweb.xin/twimg/profile_images/1695239906/me_bigger.jpg">@jaffathecake</a><span class="x-arch-time">19:07</span><span class="x-arch-lang-switch" role="group" aria-label="切换原文/译文"><label for="xl-1231173552851898368-zh" class="x-arch-lang-opt x-arch-lang-zh">译</label><label for="xl-1231173552851898368-orig" class="x-arch-lang-opt x-arch-lang-orig">原</label></span><a class="x-arch-link" href="https://x.com/jaffathecake/status/1231173552851898368" 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">Some sources of random data are better than others. Eg:<br /><br />🥉 Math.random()<br />🥈 crypto.getRandomValues(array)<br />🥇 The compass on any Android device</div>
    <div class="x-arch-text x-arch-trans">有些随机数据来源比其他的更靠谱。比如：<br /><br />🥉 Math.random()<br />🥈 crypto.getRandomValues(array)<br />🥇 任何 Android 设备上的指南针</div>
  </div>
</div>
