短评 · ·

X 归档 2022-05-08

3 条动态 · 图 3 · 视频 0
🤩 Really excited about the CSS `has` pseudo-class! Only in Safari currently, but it's going to unlock a whole new class of API ideas.

For example, this `html:bg-blue-500` can change the color of the `html` tag from any arbitrary element in the document:

https://play.tailwindcss.com/2BdNjka5EI
🤩 对 CSS 的 `has` 伪类超级兴奋!目前仅 Safari 支持,但它将解锁一整类全新的 API 思路。

比如,这个 `html:bg-blue-500` 可以从文档中的任意元素改变 `html` 标签的颜色:
@adamwathan 的配图 1/1
resvg-js 2.0: A High-Performance SVG Renderer and Toolkit - https://github.com/yisibl/resvg-js
resvg-js 2.0:高性能 SVG 渲染器与工具包 - https://github.com/yisibl/resvg-js
Did you know that these two codes both print "PASS"?
你知道吗,这两段代码都会输出 "PASS"?
@kdy1dev 的配图 1/2 @kdy1dev 的配图 2/2