Skip to content

Commit

Permalink
style: Adjust icon alignment style.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Jun 27, 2018
1 parent df11987 commit a88d4b4
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 19 deletions.
4 changes: 2 additions & 2 deletions src/avatar/style/index.less
Expand Up @@ -13,7 +13,7 @@
font-size: 18px;
width: 30px;
height: 30px;
line-height: 32px;
line-height: 31px;
border-radius: 3px;
> * {
line-height: inherit;
Expand Down Expand Up @@ -43,7 +43,7 @@
font-size: 24px;
}
&-large, &-large > * {
line-height: 40px;
line-height: 36px;
}
&-circle {
border-radius: 50%;
Expand Down
3 changes: 0 additions & 3 deletions src/button/style/index.less
Expand Up @@ -72,9 +72,6 @@
animation: loading-rotate .6s linear infinite;
}
}
i[class^="w-icon"] + span {
margin-left: 5px;
}
&.w-transition-base.disabled:after,
&.w-transition-base[disabled]:after {
display: none;
Expand Down
1 change: 1 addition & 0 deletions src/collapse/style/index.less
Expand Up @@ -17,6 +17,7 @@
transition: all .3s;
& > i[class^="w-icon"]:first-child {
margin-right: 6px;
margin-top: -3px;
transform: scale(.75) rotate(-90deg);
transition: transform .24s;
}
Expand Down
2 changes: 1 addition & 1 deletion src/icon/style/index.less
Expand Up @@ -8,7 +8,7 @@
display: inline-block;
// vertical-align: middle;
font-style: normal;
vertical-align: baseline;
vertical-align: middle;
text-align: center;
text-transform: none;
}
Expand Down
5 changes: 3 additions & 2 deletions src/input-number/style/index.less
Expand Up @@ -52,13 +52,14 @@
border-radius: 0 3px 0 0;
i {
position: relative;
transform: scale(.58333333) rotate(0deg);
transform: scale(.58) rotate(0deg);
vertical-align: inherit;
}
}
&-minus {
border-radius: 0 0 3px;
i {
transform: scale(0.58333333) translateY(1px);
transform: scale(0.58) translateY(1px);
}
}
.w-disabled &-control {
Expand Down
6 changes: 2 additions & 4 deletions src/input-password/InputPassword.js
Expand Up @@ -11,22 +11,20 @@ export default class InputPassword extends Input {
}

render() {
const { prefixCls, value, onIconClick, onChange, ...other } = this.props;
const { prefixCls, onIconClick, ...other } = this.props;
const { toggle } = this.state;
const cls = this.classNames(prefixCls, {
'password-show': toggle,
isShow: toggle,
});

return (
<Input
{...other}
className={cls}
type={toggle ? 'text' : 'password'}
value={value}
onIconClick={() => {
this.setState({ toggle: !toggle }, onIconClick);
}}
onChange={onChange}
/>
);
}
Expand Down
12 changes: 8 additions & 4 deletions src/input-password/style/index.less
@@ -1,6 +1,10 @@
.w-input-password.password-show.w-input-icon {
.event {
color: #0fa120;
.w-input-password {
&.isShow.w-input-icon {
.event {
color: #0fa120;
}
}
.w-input-icon-inner {
font-size: 14px;
}
}

8 changes: 6 additions & 2 deletions src/tree/style/index.less
Expand Up @@ -25,8 +25,8 @@
&-icon {
cursor: pointer;
width: 24px;
height: 22px;
// line-height: 24px;
height: 18px;
line-height: 16px;
transform: scale(.59);
&.is-close::before {
transform: rotate(-90deg);
Expand All @@ -38,6 +38,10 @@
&.no-child::before {
content: '';
}
&.w-icon-caret-down {
font-size: 18px;
line-height: 12px;
}
}
&-inner {
display: inline-block;
Expand Down
2 changes: 1 addition & 1 deletion src/upload/style/dragger.less
Expand Up @@ -29,7 +29,7 @@
font-size: @font-size-small;
color: @upload-font-color;
line-height: 24px;
vertical-align: bottom;
vertical-align: middle;
i[class^="w-icon"] {
font-size: 24px;
margin-right: 5px;
Expand Down

0 comments on commit a88d4b4

Please sign in to comment.