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

fix: Checkbox should not show highlight when disabled #18168

Merged
merged 3 commits into from Aug 14, 2019

Conversation

@zombieJ
Copy link
Member

commented Aug 8, 2019

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

Kapture 2019-08-08 at 16 46 32

💡 Background and solution

Add disabled related style

📝 Changelog

Language Changelog
🇺🇸 English Fix Checkbox highlight by hover when disabled.
🇨🇳 Chinese 修复 Checkbox 在 disabled 时,鼠标悬浮会高亮的问题。

☑️ Self Check before Merge

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

@pr-triage pr-triage bot added the PR: unreviewed label Aug 8, 2019

@zombieJ zombieJ requested a review from afc163 Aug 8, 2019

@netlify

This comment has been minimized.

Copy link

commented Aug 8, 2019

Deploy preview for ant-design ready!

Built with commit aa0bfc6

https://deploy-preview-18168--ant-design.netlify.com

@afc163

This comment has been minimized.

Copy link
Member

commented Aug 8, 2019

不如把 visibility: visible; 的地方加上 :not(xxxx-disabled)

@codecov

This comment has been minimized.

Copy link

commented Aug 8, 2019

Codecov Report

Merging #18168 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #18168   +/-   ##
=======================================
  Coverage   96.28%   96.28%           
=======================================
  Files         276      276           
  Lines        7520     7520           
  Branches     2089     2048   -41     
=======================================
  Hits         7241     7241           
  Misses        277      277           
  Partials        2        2

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 40f64cb...aa0bfc6. Read the comment docs.

@zombieJ

This comment has been minimized.

Copy link
Member Author

commented Aug 14, 2019

不如把 visibility: visible; 的地方加上 :not(xxxx-disabled)

这么写是为了按状态分,disabled 的相关样式都在一起。以后要重构也方便。

@afc163

This comment has been minimized.

Copy link
Member

commented Aug 14, 2019

靠优先级会提高复杂度,也容易互相覆盖,不如精确剪枝。

@zombieJ

This comment has been minimized.

Copy link
Member Author

commented Aug 14, 2019

从重构看,selector priority 好处比坏处多。遗留代码里的 not 很容易变成不敢动的代码。

@afc163

This comment has been minimized.

Copy link
Member

commented Aug 14, 2019

好吧你这么坚持,其实没多大区别。

&:hover::after,
.@{checkbox-prefix-cls}-wrapper:hover &::after {
visibility: hidden;
}

This comment has been minimized.

Copy link
@afc163

afc163 Aug 14, 2019

Member

另外,这句代码如果不看上下文的样式是看不懂的。

This comment has been minimized.

Copy link
@zombieJ

zombieJ Aug 14, 2019

Author Member

👌我加个备注

@zombieJ zombieJ merged commit dfd6ce8 into master Aug 14, 2019

26 of 29 checks passed

Build
Details
Header rules - ant-design No header rules processed
Details
LGTM analysis: JavaScript No code changes detected
Details
Pages changed - ant-design 221 new files uploaded
Details
License Compliance All checks passed.
Details
Mixed content - ant-design No mixed content detected
Details
Redirect rules - ant-design 18 redirect rules processed
Details
Semantic Pull Request ready to be squashed
Details
WIP Ready for review
Details
ant-design.ant-design #ant design succeeded
Details
buildsize No change
Details
ci/circleci: compile Your tests passed on CircleCI!
Details
ci/circleci: dist Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: setup Your tests passed on CircleCI!
Details
ci/circleci: test_dist Your tests passed on CircleCI!
Details
ci/circleci: test_dist_15 Your tests passed on CircleCI!
Details
ci/circleci: test_dom Your tests passed on CircleCI!
Details
ci/circleci: test_dom_15 Your tests passed on CircleCI!
Details
ci/circleci: test_es Your tests passed on CircleCI!
Details
ci/circleci: test_es_15 Your tests passed on CircleCI!
Details
ci/circleci: test_lib Your tests passed on CircleCI!
Details
ci/circleci: test_lib_15 Your tests passed on CircleCI!
Details
ci/circleci: test_node Your tests passed on CircleCI!
Details
ci/circleci: test_node_15 Your tests passed on CircleCI!
Details
codecov/patch Coverage not affected when comparing 40f64cb...aa0bfc6
Details
codecov/project 96.28% remains the same compared to 40f64cb
Details
netlify/ant-design/deploy-preview Deploy preview ready!
Details
security/snyk - package.json (paranoidjk) No manifest changes detected

@zombieJ zombieJ deleted the checkbox-fix branch Aug 14, 2019

@pr-triage pr-triage bot added PR: merged and removed PR: unreviewed labels Aug 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.