X 归档 2020-09-11
I'm excited for CSS to help distribute AVIF images! Here's some demo code that follows current spec drafts:
- if in data saver / lite mode
- match first format supported
- match first resolution supported
- make that image the background
image-set() spec https://drafts.csswg.org/css-images-4/#image-set-notation
- if in data saver / lite mode
- match first format supported
- match first resolution supported
- make that image the background
image-set() spec https://drafts.csswg.org/css-images-4/#image-set-notation
很高兴 CSS 能帮助分发 AVIF 图像!下面是一段遵循当前规范草案的演示代码:
- 如果处于省流量 / 轻量模式
- 匹配第一个受支持的格式
- 匹配第一个受支持的分辨率
- 把那张图设为背景
image-set() 规范 https://drafts.csswg.org/css-images-4/#image-set-notation
- 如果处于省流量 / 轻量模式
- 匹配第一个受支持的格式
- 匹配第一个受支持的分辨率
- 把那张图设为背景
image-set() 规范 https://drafts.csswg.org/css-images-4/#image-set-notation
Want to run on https locally, without a bunch of fuss?
This is your ticket, so nice!
Five stars 😂 would install again... ⭐⭐⭐⭐⭐
https://www.npmjs.com/package/devcert
This is your ticket, so nice!
Five stars 😂 would install again... ⭐⭐⭐⭐⭐
https://www.npmjs.com/package/devcert
It’s amazing what people are doing with tagged templates (*). The plugin should work with plain JavaScript, too (under the hood, VS Code uses the TypeScript language server for completions).
(*) https://exploringjs.com/impatient-js/ch_template-literals.html#tagged-templates
(*) https://exploringjs.com/impatient-js/ch_template-literals.html#tagged-templates
大家用标签模板(tagged templates)(*)做出来的东西太惊人了。这个插件应该也能在纯 JavaScript 下工作(VS Code 在底层用 TypeScript 语言服务来提供补全)。
(*) https://exploringjs.com/impatient-js/ch_template-literals.html#tagged-templates
(*) https://exploringjs.com/impatient-js/ch_template-literals.html#tagged-templates
Erlang is getting a JIT! In some preliminary benchmarks my Jason library is beating a native C implementation (jiffy). Real-world applications like RabbitMQ seeing 30-50% throughput increase. This is huge. Congrats @garazdawi 🥳 https://t.co/GRO2IoMK5b
Erlang 要有 JIT 了!在一些初步基准测试中,我的 Jason 库跑赢了一个原生 C 实现(jiffy)。RabbitMQ 这类真实应用的吞吐量提升了 30-50%。这太重大了。恭喜 @garazdawi 🥳 https://t.co/GRO2IoMK5b




