Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RadioButton与Checkbox的动画在Chromium引擎下缺少一部分 #278

Open
Aira-Sakuranomiya opened this issue Dec 8, 2024 · 2 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@Aira-Sakuranomiya
Copy link
Member

Aira-Sakuranomiya commented Dec 8, 2024

自从某个版本的Chromium开始,RadioButton与Checkbox的动画就一直缺少一部分,Safari和Firefox经过测试均正常。

@Aira-Sakuranomiya Aira-Sakuranomiya added the bug Something isn't working label Dec 8, 2024
@Aira-Sakuranomiya Aira-Sakuranomiya self-assigned this Dec 8, 2024
@Aira-Sakuranomiya Aira-Sakuranomiya changed the title RadioButton与Checkbox的动画在Chromium引擎下显示不正常 RadioButton与Checkbox的动画在Chromium引擎下缺少一部分 Dec 8, 2024
@otomad otomad added info needed Issue requires more information from poster and removed bug Something isn't working labels Dec 10, 2024
@otomad
Copy link
Member

otomad commented Dec 10, 2024

与跟踪链接中的问题无关,跟踪链接中:

@keyframes fade {
    from {
        --color: var(--light);
    }
    to {
        --color: var(--dark);
    }
}

意外将 CSS 自定义属性 --color 置入了关键帧动画中,这是不允许的,因为 CSS 不知道 --color 是什么类型的。除非使用 @property --color 特性,将自定义属性注册为全局属性并向其分配类型、继承等附加信息,这样才会正常工作。不推荐过多地使用 @property 特性,因为全局变量不易维护,并且容易与其它属性重名造成意外的结果。

本案使用 box-shadow 作为动画属性,不受影响。

至于显示颜色变量无法正确获取,这是 Chromium DevTools 审查元素工具的 bug,虽显示如此,但实际上是可以正常获取的。不信你可以对一个无关元素应用最小预置的关键帧动画,例如以颜色变量只改变 color 属性。

请重新审视产生问题的原因。

@Aira-Sakuranomiya
Copy link
Member Author

Aira-Sakuranomiya commented Dec 10, 2024

已修正内容,不过我找不出别的原因,你能找出来吗?
还有,这个无论如何来说都是bug啊,为什么移除bug的label???????就算内容有不准确的地方你也不应该将这个bug不视为bug

@Aira-Sakuranomiya Aira-Sakuranomiya added bug Something isn't working and removed info needed Issue requires more information from poster labels Dec 10, 2024
@otomad otomad added the help wanted Extra attention is needed label Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
Status: No status
Development

No branches or pull requests

2 participants