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

支持 :focus-ring #121

Closed
Justineo opened this issue Aug 28, 2017 · 0 comments
Closed

支持 :focus-ring #121

Justineo opened this issue Aug 28, 2017 · 0 comments

Comments

@Justineo
Copy link
Member

Justineo commented Aug 28, 2017

实现 :focus-ring 样式,模拟类似 Chrome 中 <button> 仅在键盘导航触发聚焦时显示 focus ring 的效果。(:focus 条件过于宽泛,因为鼠标点击后仍然处于聚焦状态,造成一种「按钮被选中」的假象。)

比如下图的按钮组:

image

第一个按钮被鼠标点击后效果如下:

image

可以引入 polyfill 后将 :focus 样式调整为 .focus-ring 的样式。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant