Skip to content

Commit

Permalink
fix(listButtons): Update list button sizes, closes #478
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Bradley committed Feb 10, 2014
1 parent 4c9a4c0 commit 9165211
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 9 deletions.
27 changes: 19 additions & 8 deletions scss/_items.scss
Original file line number Diff line number Diff line change
Expand Up @@ -308,16 +308,24 @@ a.item-content {
position: absolute;
top: $item-padding / 2;
left: $item-padding / 2;
min-width: initial;
min-height: $item-icon-font-size;
font-size: $item-icon-font-size;
min-width: $item-icon-font-size + ($button-border-width * 2);
min-height: $item-icon-font-size + ($button-border-width * 2);
font-size: $item-button-font-size;
line-height: $item-button-line-height;

.icon:before {
position: relative;
left: auto;
width: auto;
line-height: $item-icon-font-size - 1;
}

> .button {
margin: 0px 2px;
min-height: $item-icon-font-size + ($button-border-width * 2);
font-size: $item-button-font-size;
line-height: $item-button-line-height;
}
}

.item-button-right,
Expand All @@ -335,9 +343,10 @@ button.item.item-button-right {
position: absolute;
top: $item-padding / 2;
right: $item-padding;
min-width: initial;
min-height: $item-icon-font-size;
font-size: $item-icon-font-size;
min-width: $item-icon-font-size + ($button-border-width * 2);
min-height: $item-icon-font-size + ($button-border-width * 2);
font-size: $item-button-font-size;
line-height: $item-button-line-height;

.icon:before {
position: relative;
Expand All @@ -348,8 +357,10 @@ button.item.item-button-right {

> .button {
margin: 0px 2px;
min-height: $item-icon-font-size;
font-size: $item-icon-font-size;
min-width: $item-icon-font-size + ($button-border-width * 2);
min-height: $item-icon-font-size + ($button-border-width * 2);
font-size: $item-button-font-size;
line-height: $item-button-line-height;
}
}

Expand Down
2 changes: 2 additions & 0 deletions scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,8 @@ $item-font-size: 16px;
$item-border-width: 1px !default;
$item-padding: 15px !default;

$item-button-font-size: 18px !default;
$item-button-line-height: 32px !default;
$item-icon-font-size: 32px !default;
$item-icon-fill-font-size: 28px !default;

Expand Down
16 changes: 15 additions & 1 deletion test/lists.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,26 @@ <h1 class="title">Lists</h1>

<div class="item item-icon-left item-button-right">
<i class="icon ion-chatbubble-working ion-primary"></i>
Call Ma
Left Icon and Right Button
<button class="button button-positive">
<i class="icon ion-ios7-telephone"></i>
</button>
</div>

<div class="item item-button-right">
Right Button
<button class="button button-positive">
<i class="icon ion-ios7-telephone"></i>
</button>
</div>

<div class="item item-button-right">
Right Button Text
<button class="button button-positive">
<i class="icon ion-ios7-telephone"></i> Text
</button>
</div>

<div class="item item-icon-left item-button-right">
<i class="icon ion-chatbubble-working ion-primary"></i>
Call Ma
Expand Down

0 comments on commit 9165211

Please sign in to comment.