Skip to content

Commit

Permalink
fix(item): Fix badge moving to new line when text is too long, closes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Bradley committed Mar 1, 2014
1 parent 11a4338 commit 4d36671
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion scss/_items.scss
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@

// Align badges within items
.badge {
float: right;
@include display-flex();
position: absolute;
top: $item-padding;
right: ($item-padding * 2) + 5;
}
.badge + .badge {
margin-right: 5px;
Expand Down
5 changes: 4 additions & 1 deletion test/html/lists.html
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,9 @@ <h1 class="title">Lists</h1>

<a href="#" class="item item-icon-left">
<i class="icon ion-person-stalker energized fill-icon"></i>
Friends
Friends asdfasdf asdfasd fasdfasdf asdf asdfasd fasdf asdf asd
asdfasdfasdf asdfasdfasdf asdf asdf asdfasdfasd fasdfa sdfasdf asdf asdf
asdfa sdf asdfasdfa sdf asdf asdfasdfasdf asdf asdf asdf
<span class="badge badge-assertive">0</span>
</a>

Expand All @@ -191,6 +193,7 @@ <h1 class="title">Lists</h1>

<div href="#" class="item">
Not a link so no default right arrow
<span class="badge badge-assertive">999</span>
</div>

<a href="#" class="item item-complex">
Expand Down

5 comments on commit 4d36671

@damienleri
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change pushes my numeric badges below the middle of the list item, as shown (before and after)

screenshot 2014-03-01 15 09 37

screenshot 2014-03-01 15 10 08

@adamdbradley
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what I'm seeing when it's applied:
image

Can you post the HTML your using that shows the badge like this? How can I replicate the issue? Thanks

@damienleri
Copy link

@damienleri damienleri commented on 4d36671 Mar 3, 2014 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adamdbradley
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the plunker. I've added in css so it adjusts the height for .item-divider too.

@damienleri
Copy link

@damienleri damienleri commented on 4d36671 Mar 3, 2014 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.