Skip to content

Commit 69442d5

Browse files
committed
fix(buttons): centering icons on <a> tag buttons. Closes ionic-team#2074
1 parent 5605317 commit 69442d5

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

scss/_button.scss

+7
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,13 @@ input.button.button-block {
235235

236236
a.button {
237237
text-decoration: none;
238+
239+
.icon:before,
240+
&.icon:before,
241+
&.icon-left:before,
242+
&.icon-right:before {
243+
margin-top: 2px;
244+
}
238245
}
239246

240247
.button.disabled,

test/css/buttons-link-icon.html

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<!DOCTYPE html>
2+
<html ng-app="ionic">
3+
<head>
4+
<script src="../../dist/js/ionic.bundle.js"></script>
5+
<meta charset="utf-8">
6+
<title>Buttons</title>
7+
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
8+
<link href="../../dist/css/ionic.css" rel="stylesheet">
9+
<style>
10+
body {
11+
position: absolute;;
12+
}
13+
</style>
14+
</head>
15+
<body>
16+
17+
<header class="bar bar-header bar-dark">
18+
<h1 class="title">Buttons: &lt;link&gt; block w/ icons</h1>
19+
</header>
20+
21+
<div class="content has-header padding">
22+
<button class="button">
23+
<i class="icon ion-loading-c"></i> Loading...
24+
</button>
25+
<br />
26+
<button class="button icon-left ion-home">Home</button>
27+
<br />
28+
<button class="button icon-left ion-star button-positive">Favorites</button>
29+
<br />
30+
<a class="button icon-right ion-chevron-right button-calm">Learn More</a>
31+
<br />
32+
<a class="button icon-left ion-chevron-left button-clear button-dark">Back</a>
33+
<br />
34+
<button class="button icon ion-gear-a"></button>
35+
<br />
36+
<a class="button button-icon icon ion-settings"></a>
37+
<br />
38+
<a class="button button-outline icon-right ion-navicon button-balanced">Reorder</a>
39+
</div>
40+
41+
</body>
42+
</html>

0 commit comments

Comments
 (0)