Skip to content

Commit

Permalink
fix: 修复 Spin 垂直居中问题 close ant-design#3097 (ant-design#3214)
Browse files Browse the repository at this point in the history
  • Loading branch information
ddcat1115 authored and benjycui committed Sep 30, 2016
1 parent 06e4eaa commit 96e71a4
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions components/spin/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,29 @@
margin: -@spin-dot-size-lg / 2;
}

&-show-text .@{spin-prefix-cls}-dot {
margin: -@spin-dot-size / 2 - @font-size-base / 2;
}

&-show-text.@{spin-prefix-cls}-sm .@{spin-prefix-cls}-dot {
margin: -@spin-dot-size-sm / 2 - @font-size-base / 2;
}

&-show-text.@{spin-prefix-cls}-lg .@{spin-prefix-cls}-dot {
margin: -@spin-dot-size-lg / 2 - @font-size-base / 2;
}

&-text {
position: absolute;
top: 50%;
width: 100%;
padding-top: @spin-dot-size / 2;
padding-top: (@spin-dot-size - @font-size-base) / 2;
}
&-sm &-text {
padding-top: @spin-dot-size-sm / 2;
&-sm .@{spin-prefix-cls}-text {
padding-top: (@spin-dot-size-sm - @font-size-base) / 2;
}
&-lg &-text {
padding-top: @spin-dot-size-lg / 2;
&-lg .@{spin-prefix-cls}-text {
padding-top: (@spin-dot-size-lg - @font-size-base) / 2;
}
}

Expand Down

0 comments on commit 96e71a4

Please sign in to comment.