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

Tabs组中 被激活的Tab页签的下划线在使用浏览器缩放时, 会显示错误 #15234

Closed
1 task done
zzzmj opened this issue Mar 6, 2019 · 7 comments
Closed
1 task done

Comments

@zzzmj
Copy link

zzzmj commented Mar 6, 2019

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

https://ant.design/components/tabs-cn/

Steps to reproduce

我一开始是跑本地项目发现了这个BUG
在官网即可重现.

  1. 13.3寸的笔记本
  2. 缩放比例110%或者125%的时候
  3. 被选中tab标签的下划线没有被正确关闭

What is expected?

我期望被选中的Tab标签border-bottom能够被正确关闭
并知道是为什么导致的

What is actually happening?

实际上他并不能正确关闭

Environment Info
antd 3.14.1
React 16.8.3
System win10
Browser Chrome浏览器 版本 72.0.3626.121(正式版本) (64 位)

我一开始是跑本地项目发现了这个BUG
我在缩放的我浏览器的时候, 发现被选中的tab标签的border不能正确的被关闭

@zombieJ
Copy link
Member

zombieJ commented Mar 6, 2019

缩放表现是和游览器相关,Chrome 缩放后像素计算精度偏差导致的:
2019-03-06 6 23 45

另外,缩放尺寸因为不是用户常见行为。这边不会特殊处理。

@zombieJ zombieJ closed this as completed Mar 6, 2019
@afc163 afc163 reopened this Mar 6, 2019
@afc163
Copy link
Member

afc163 commented Mar 6, 2019

.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab-active {
-   padding-bottom: 1px;
+   padding-bottom: 1.5px;
    color: #1890ff;
    background: #fff;
    border-color: #e8e8e8;
}

试了下这样可以修。能修的而且成本不高没副作用的还是可以尽力搞搞。

@zzzmj
Copy link
Author

zzzmj commented Mar 6, 2019

缩放表现是和游览器相关,Chrome 缩放后像素计算精度偏差导致的:
2019-03-06 6 23 45

另外,缩放尺寸因为不是用户常见行为。这边不会特殊处理。

呃呃呃, 其实我觉得对于小尺寸的电脑来说, 缩放还是挺常见的, 一般13寸的电脑用浏览器都需要缩放到125%或者150%

@zombieJ
Copy link
Member

zombieJ commented Mar 6, 2019

试了下这样可以修。能修的而且成本不高没副作用的还是可以尽力搞搞。

这样只是修了 Chrome,还有其他游览器。

Firefox (突出来 1 px)
2019-03-06 8 56 16

Safari (没封头)
2019-03-06 8 56 21

我是不建议针对缩放做样式微调,容易给正常尺寸下埋坑。而且也不解决问题。

@afc163
Copy link
Member

afc163 commented Mar 6, 2019

那找找更好的解决方案,缩放一定意义上也是可访问性问题。

当然,找不到合理方案就算了。

@afc163
Copy link
Member

afc163 commented Mar 7, 2019

试了下确实没啥好办法,等 chrome 做渲染优化吧。

@afc163 afc163 closed this as completed Mar 7, 2019
@afc163 afc163 reopened this Mar 9, 2019
@afc163
Copy link
Member

afc163 commented Mar 9, 2019

#15299 貌似解决了这个问题。

@afc163 afc163 closed this as completed Mar 9, 2019
This was referenced Mar 17, 2019
afc163 pushed a commit that referenced this issue Mar 18, 2019
* another try of fixing tab style

* fix card mode tab bottom line animation

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

No branches or pull requests

4 participants