[英]Lost color on hover transition in Safari 13, is this a bug?
I found that under certain CSS conditions the color of a link will turn transparent on hover (and then remain transparent) in Safari 13 (which is the current version of Safari on older versions of macOS). I found that under certain CSS conditions the color of a link will turn transparent on hover (and then remain transparent) in Safari 13 (which is the current version of Safari on older versions of macOS). I guess this is a bug, because it doesn't happen in Safari 14.
我想这是一个错误,因为它不会发生在 Safari 14 中。
This is the combination of CSS rules that triggers this behaviour:这是触发此行为的 CSS 规则的组合:
:root {
--my-color: color(display-p3 1 0 0);
}
* {
box-sizing: inherit;
}
a {
transition: all .15s linear;
color: var(--my-color);
}
a:hover {
text-decoration: none;
}
The color will change from color(display-p3 1 0 0)
to rgba(0, 0, 0, 0)
according to the web inspector in Safari 13.根据 Safari 13 中的 web 检查器,颜色将从
color(display-p3 1 0 0)
变为rgba(0, 0, 0, 0)
。
I've created a CodePen and I guess my question is;我创建了一个 CodePen,我想我的问题是; can someone confirm this behaviour in Safari 13?
有人可以在 Safari 13 中确认这种行为吗? https://codepen.io/aetles/pen/WNRWeya
https://codepen.io/aetles/pen/WNRWeya
No, this is not a bug.不,这不是错误。 Safari has certain limitations with HTML.
Safari 对 HTML 有一定的限制。
Rather than having color: var(--my-color)
have color: #COLOR
.而不是
color: var(--my-color)
有color: #COLOR
。
Safari is not as good with handling HTML, CSS and Javascript files as google, this may help. Safari 在处理 HTML、CSS 和 Z9E13B69D1D2DA927102ACAAAF7154 等 Google 帮助文件方面表现不佳。
If not, sorry, i have no answer.如果没有,对不起,我没有答案。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.