From 1460a7d455f7df551451de69ce59420fdd144899 Mon Sep 17 00:00:00 2001 From: Tom Xu Date: Sun, 30 Sep 2018 15:23:47 +0800 Subject: [PATCH] fix #12395. input group hover style error (#12407) First of all, thank you for your contribution! :-) Please makes sure that these checkboxes are checked before submitting your PR, thank you! * [x] Make sure that you propose PR to right branch: bugfix for `master`, feature for branch `feature`. * [x] Make sure that you follow antd's [code convention](https://github.com/ant-design/ant-design/wiki/Code-convention-for-antd). * [x] Run `npm run lint` and fix those errors before submitting in order to keep consistent code style. * [x] Rebase before creating a PR to keep commit history clear. * [x] Add some descriptions and refer relative issues for you PR. Extra checklist: **if** *isBugFix* **:** * [x] Make sure that you add at least one unit test for the bug which you had fixed. **elif** *isNewFeature* **:** * [ ] Update API docs for the component. * [ ] Update/Add demo to demonstrate new feature. * [ ] Update TypeScript definition for the component. * [ ] Add unit tests for the feature. --- components/cascader/style/index.less | 2 +- components/input/style/mixin.less | 35 +++++++++++++++++++++++++++- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/components/cascader/style/index.less b/components/cascader/style/index.less index 7240d8e8e2e9..5de52826eb3e 100644 --- a/components/cascader/style/index.less +++ b/components/cascader/style/index.less @@ -13,7 +13,7 @@ background-color: transparent !important; cursor: pointer; width: 100%; - position: static; + position: relative; } &-picker-show-search &-input.@{ant-prefix}-input { diff --git a/components/input/style/mixin.less b/components/input/style/mixin.less index 263b6644179a..27e27af7cb04 100644 --- a/components/input/style/mixin.less +++ b/components/input/style/mixin.less @@ -263,6 +263,21 @@ display: block; .clearfix; + &-addon, + &-wrap, + > .@{inputClass} { + &:not(:first-child):not(:last-child) { + border-right-width: 1px; + border-right-color: transparent; + &:hover { + .hover(); + } + &:focus { + .active(); + } + } + } + & > * { border-radius: 0; border-right-width: 0; @@ -289,7 +304,14 @@ & > .@{ant-prefix}-mention-wrapper .@{ant-prefix}-mention-editor, & > .@{ant-prefix}-time-picker .@{ant-prefix}-time-picker-input { border-radius: 0; - border-right-width: 0; + border-right-width: 1px; + border-right-color: transparent; + &:hover { + .hover(); + } + &:focus { + .active(); + } } & > *:first-child, @@ -308,11 +330,22 @@ & > .@{ant-prefix}-calendar-picker:last-child .@{ant-prefix}-input, & > .@{ant-prefix}-select-auto-complete:last-child .@{ant-prefix}-input, & > .@{ant-prefix}-cascader-picker:last-child .@{ant-prefix}-input, + & > .@{ant-prefix}-cascader-picker-focused:last-child .@{ant-prefix}-input, & > .@{ant-prefix}-mention-wrapper:last-child .@{ant-prefix}-mention-editor, & > .@{ant-prefix}-time-picker:last-child .@{ant-prefix}-time-picker-input { border-top-right-radius: @border-radius-base; border-bottom-right-radius: @border-radius-base; border-right-width: 1px; + border-right-color: @input-border-color; + &:hover { + .hover(); + } + &:focus { + .active(); + .@{ant-prefix}-cascader-input { + .active(); + } + } } } }