Skip to content

Commit 2a6f702

Browse files
committed
fix(tabs): Tab icon align within nested tabs, closes #1093
1 parent b57b893 commit 2a6f702

File tree

2 files changed

+38
-6
lines changed

2 files changed

+38
-6
lines changed

Diff for: scss/_tabs.scss

+4-4
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@
129129
display: none;
130130
}
131131

132-
.tabs-icon-top .tab-item,
133-
.tabs-icon-bottom .tab-item {
132+
.tabs-icon-top > .tabs .tab-item,
133+
.tabs-icon-bottom > .tabs .tab-item {
134134
font-size: $tabs-text-font-size-side-icon;
135135
line-height: $tabs-text-font-size;
136136
}
@@ -142,8 +142,8 @@
142142
font-size: $tabs-icon-size;
143143
}
144144

145-
.tabs-icon-left .tab-item,
146-
.tabs-icon-right .tab-item {
145+
.tabs-icon-left > .tabs .tab-item,
146+
.tabs-icon-right > .tabs .tab-item {
147147
font-size: $tabs-text-font-size-side-icon;
148148

149149
.icon {

Diff for: test/css/tab-bars-icons-bottom.html

+34-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
66
<link href="../../dist/css/ionic.css" rel="stylesheet">
77
</head>
8-
<body>
8+
<body class="tabs-icon-bottom">
99

1010
<header class="bar bar-header bar-dark">
1111
<h1 class="title">Tab Bars</h1>
@@ -24,8 +24,40 @@ <h1>Icons On Bottom Of Text</h1>
2424
<li><a href="./">Homepage</a></li>
2525
</ul>
2626

27+
<div class="list card tabs-icon-left">
28+
29+
<div class="item item-avatar">
30+
<img src="http://ionicframework.com/img/docs/mcfly.jpg">
31+
<h2>Marty McFly</h2>
32+
<p>November 05, 1955</p>
33+
</div>
34+
35+
<div class="item item-body">
36+
<p>
37+
This is a crude example of the parent tabs having .tabs-icon-bottom set,
38+
while a nested tabs has .tabs-icon-left set.
39+
</p>
40+
</div>
41+
42+
<div class="item tabs tabs-secondary tabs-icon-left">
43+
<a class="tab-item" href="#">
44+
<i class="icon ion-thumbsup"></i>
45+
Like
46+
</a>
47+
<a class="tab-item" href="#">
48+
<i class="icon ion-chatbox"></i>
49+
Comment
50+
</a>
51+
<a class="tab-item" href="#">
52+
<i class="icon ion-share"></i>
53+
Share
54+
</a>
55+
</div>
56+
57+
</div>
58+
2759
</main>
28-
60+
2961
<nav id="tab-bar" class="tabs tabs-icon-bottom tabs-positive">
3062
<a class="tab-item" href="#">
3163
Fun

0 commit comments

Comments
 (0)