Skip to content

Commit

Permalink
fix(vertical-align): 修复全局 icon 和 text 的 vertical align 问题
Browse files Browse the repository at this point in the history
  • Loading branch information
cinderyx committed Apr 28, 2018
1 parent 51be723 commit adc9cfa
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
6 changes: 2 additions & 4 deletions src/components/common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,12 @@ svg.icon {
width: 16px;
height: 16px;

// 为了配合解决 dao-btn 在最新版 firefox 下面 svg 偏下的问题
vertical-align: top;
vertical-align: middle;

fill: currentColor;
& + .text {
display: inline-block;

// 为了解决 dao-btn 在最新版 firefox 下面 svg 偏下的问题
vertical-align: top;
vertical-align: middle;
}
}
8 changes: 8 additions & 0 deletions src/components/dao-button/dao-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@
pointer-events: none; // Future-proof disabling of clicks on `<a>` elements
cursor: $cursor-disabled;
}
svg.icon {
// 为了配合解决 dao-btn 在最新版 firefox 下面 svg 偏下的问题
vertical-align: top;
& + .text {
// 为了解决 dao-btn 在最新版 firefox 下面 svg 偏下的问题
vertical-align: top;
}
}
}

a.dao-btn {
Expand Down
5 changes: 1 addition & 4 deletions src/components/dao-input/dao-input.scss
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@
&.message-bottom {
flex-direction: column;
align-items: flex-start;
// 统一 vertical-align,解决没有垂直对齐的问题
vertical-align: top;
.dao-input-message {
margin: 6px 0 0;
}
Expand Down Expand Up @@ -397,8 +395,7 @@
word-break: break-all;
margin-left: 10px;
> span {
// 统一 vertical-align,解决没有垂直对齐的问题
vertical-align: top;
vertical-align: middle;
}
@at-root .no-message-icon & > .icon {
display: none;
Expand Down

0 comments on commit adc9cfa

Please sign in to comment.