Skip to content

Commit

Permalink
fix ant-design#12395. input group hover style error (ant-design#12407)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
hengkx authored and vsoren committed Oct 5, 2018
1 parent 9afa669 commit 1460a7d
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/cascader/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
background-color: transparent !important;
cursor: pointer;
width: 100%;
position: static;
position: relative;
}

&-picker-show-search &-input.@{ant-prefix}-input {
Expand Down
35 changes: 34 additions & 1 deletion components/input/style/mixin.less
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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,
Expand All @@ -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();
}
}
}
}
}
Expand Down

0 comments on commit 1460a7d

Please sign in to comment.