Skip to content

Commit

Permalink
Fix badge position when it's children is display:block
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Aug 16, 2018
1 parent b126b23 commit 84119d8
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions components/badge/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@

&-count {
position: absolute;
transform: translateX(-50%);
top: -@badge-height / 2;
transform: translate(50%, -50%);
top: 0;
right: 0;
height: @badge-height;
border-radius: @badge-height / 2;
min-width: @badge-height;
Expand All @@ -27,7 +28,7 @@
font-size: @badge-font-size;
font-weight: @badge-font-weight;
white-space: nowrap;
transform-origin: -10% center;
transform-origin: 0 center;
box-shadow: 0 0 0 1px #fff;
a,
a:hover {
Expand All @@ -41,9 +42,10 @@

&-dot {
position: absolute;
transform: translateX(-50%);
transform: translate(50%, -50%);
transform-origin: 0 center;
top: -@badge-dot-size / 2;
top: 0;
right: 0;
height: @badge-dot-size;
width: @badge-dot-size;
border-radius: 100%;
Expand Down

0 comments on commit 84119d8

Please sign in to comment.