短评 · ·

X 归档 2020-02-22

7 条动态 · 图 4 · 视频 2
🏗️ Working on a little responsive confirmation modal for Tailwind UI...
🏗️ 正在为 Tailwind UI 做一个响应式确认弹窗……
How to detect browser support for Module Workers:

https://gist.github.com/developit/5b09dc86c644d76f8fbd8abe294440f2

(h/t @AndersCan for asking about this!)
如何检测浏览器对 Module Workers 的支持:

https://gist.github.com/developit/5b09dc86c644d76f8fbd8abe294440f2

(感谢 @AndersCan 提出这个问题!)
@_developit 的配图 1/1
How to detect browser support for Module Workers:

https://gist.github.com/developit/5b09dc86c644d76f8fbd8abe294440f2

(h/t @AndersCan for asking about this!)
如何检测浏览器对 Module Workers 的支持:

https://gist.github.com/developit/5b09dc86c644d76f8fbd8abe294440f2

(感谢 @AndersCan 提出这个问题!)
@_developit 的配图 1/1
`font-variant-numeric: tabular-nums` is one of my favorite CSS properties. It sets numbers as monospace, so they're prettily aligned in tables.

Another use case I came across is this little character counter. Notice how much smoother it becomes with tabular nums.
`font-variant-numeric: tabular-nums` 是我最喜欢的 CSS 属性之一。它把数字设成等宽,让它们在表格里整齐对齐。

我遇到的另一个用例是这个小小的字符计数器。注意用上 tabular nums 之后它变得顺眼了多少。
JavaScript loading priorities in Chrome: http://bit.ly/loading-priorities ~ how do <script>, <script defer>, <link rel=preload> + <script async> & friends load then execute? Useful table.
Chrome 中 JavaScript 的加载优先级: ~ <script>、<script defer>、<link rel=preload> + <script async> 之类是怎么先加载再执行的?很实用的一张表。
@addyosmani 的配图 1/1
Another useful tip for memory debugging (not mentioned in the article) is `queryObjects(SomeConstructor)`, which can be used from the DevTools Console: https://developers.google.com/web/updates/2017/08/devtools-release-notes#query-objects
另一个好用的内存调试技巧(文章里没提到)是 `queryObjects(SomeConstructor)`,可以在 DevTools 控制台里用:https://developers.google.com/web/updates/2017/08/devtools-release-notes#query-objects
@mathias 的配图 1/1
Some sources of random data are better than others. Eg:

🥉 Math.random()
🥈 crypto.getRandomValues(array)
🥇 The compass on any Android device
有些随机数据来源比其他的更靠谱。比如:

🥉 Math.random()
🥈 crypto.getRandomValues(array)
🥇 任何 Android 设备上的指南针