HE Shi-Jun

Results 543 comments of HE Shi-Jun

@cssmagic 所有在选择器里明确写出`:root`或`html`的是可以知道的。问题在于没有它们的class选择器或属性选择器之类的。一个粗暴的办法是所有选择器前加两种 `:root:root`—— `:root:root.xxx, :root:root .xxx { ... }` 。(为了不支持 `:root` 的浏览器,可改为 `.-pc-root`。) 更简单的办法是要求所有针对根的样式规则明确写出`:root`,以及减少这样的样式(写到body上去)。这可视为一个limitation,好在写到root上样式的use cases比较少。我们最常见的一种用法是Modernizr。而本方式实际上是取代Modernizr的特性class方式的。而针对user-agent的hack也可以通过扩展一个类似`@supports`的机制达成。

@Justineo 嗯,我正是觉得现有的预处理器只能编译出css,是大大削弱了其能力啊,尤其是polyfill的能力。

@sapjax shadow dom 本来就不该处理啊。

@sapjax shadow dom本来就是要特殊语法的啊,比如`/deep/`之类的。它跟其他特性是正交的。

@sapjax 我理解你的意思了。shadow dom的样式应该需要单独处理,比如把 `:root` 换成 `:host` 之类的?

@sapjax 嗯,scoped style跟本方法的假设是矛盾的。 不过如你所言,shadow dom的支持浏览器基本上是`@supports`的真子集。且shadow dom没有比较可靠的polyfill。所以几乎可以不管这个事情。

@yisibl 这个并不是运行时的css processor,只是一个需要运行时配合的css processor :joy_cat:

Yeah, this is a pain point very much. Note the original code `#{...rec, a.b[c].d: a.b[c].d + 1}` already have the bug, the right code might be: `#{...rec, a.b[c].d: rec.a.b[c].d +...

> Nor do objects. Why would we want to solve this piecemeal? As I understand, the general purpose of the proposal is to solve the ergonomic problem of updating tuples/records,...

@isiahmeadows I wrote the code example to illustrate the different style , I'm sorry it could make confusion. What I try to describe is, instead of avoid mutation, another (maybe...