0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-29 21:52:22 +01:00

fix #1823: styles of tabs within other tabs resolved

This commit is contained in:
Mark Otto 2012-04-14 18:47:27 -07:00
parent def7ae7798
commit fc7ae48c95
4 changed files with 88 additions and 45 deletions

Binary file not shown.

View File

@ -2856,9 +2856,9 @@ input[type="submit"].btn.btn-mini {
.tab-content { .tab-content {
overflow: auto; overflow: auto;
} }
.tabs-below .nav-tabs, .tabs-below > .nav-tabs,
.tabs-right .nav-tabs, .tabs-right > .nav-tabs,
.tabs-left .nav-tabs { .tabs-left > .nav-tabs {
border-bottom: 0; border-bottom: 0;
} }
.tab-content > .tab-pane, .tab-content > .tab-pane,
@ -2869,71 +2869,71 @@ input[type="submit"].btn.btn-mini {
.pill-content > .active { .pill-content > .active {
display: block; display: block;
} }
.tabs-below .nav-tabs { .tabs-below > .nav-tabs {
border-top: 1px solid #ddd; border-top: 1px solid #ddd;
} }
.tabs-below .nav-tabs > li { .tabs-below > .nav-tabs > li {
margin-top: -1px; margin-top: -1px;
margin-bottom: 0; margin-bottom: 0;
} }
.tabs-below .nav-tabs > li > a { .tabs-below > .nav-tabs > li > a {
-webkit-border-radius: 0 0 4px 4px; -webkit-border-radius: 0 0 4px 4px;
-moz-border-radius: 0 0 4px 4px; -moz-border-radius: 0 0 4px 4px;
border-radius: 0 0 4px 4px; border-radius: 0 0 4px 4px;
} }
.tabs-below .nav-tabs > li > a:hover { .tabs-below > .nav-tabs > li > a:hover {
border-bottom-color: transparent; border-bottom-color: transparent;
border-top-color: #ddd; border-top-color: #ddd;
} }
.tabs-below .nav-tabs .active > a, .tabs-below > .nav-tabs > .active > a,
.tabs-below .nav-tabs .active > a:hover { .tabs-below > .nav-tabs > .active > a:hover {
border-color: transparent #ddd #ddd #ddd; border-color: transparent #ddd #ddd #ddd;
} }
.tabs-left .nav-tabs > li, .tabs-left > .nav-tabs > li,
.tabs-right .nav-tabs > li { .tabs-right > .nav-tabs > li {
float: none; float: none;
} }
.tabs-left .nav-tabs > li > a, .tabs-left > .nav-tabs > li > a,
.tabs-right .nav-tabs > li > a { .tabs-right > .nav-tabs > li > a {
min-width: 74px; min-width: 74px;
margin-right: 0; margin-right: 0;
margin-bottom: 3px; margin-bottom: 3px;
} }
.tabs-left .nav-tabs { .tabs-left > .nav-tabs {
float: left; float: left;
margin-right: 19px; margin-right: 19px;
border-right: 1px solid #ddd; border-right: 1px solid #ddd;
} }
.tabs-left .nav-tabs > li > a { .tabs-left > .nav-tabs > li > a {
margin-right: -1px; margin-right: -1px;
-webkit-border-radius: 4px 0 0 4px; -webkit-border-radius: 4px 0 0 4px;
-moz-border-radius: 4px 0 0 4px; -moz-border-radius: 4px 0 0 4px;
border-radius: 4px 0 0 4px; border-radius: 4px 0 0 4px;
} }
.tabs-left .nav-tabs > li > a:hover { .tabs-left > .nav-tabs > li > a:hover {
border-color: #eeeeee #dddddd #eeeeee #eeeeee; border-color: #eeeeee #dddddd #eeeeee #eeeeee;
} }
.tabs-left .nav-tabs .active > a, .tabs-left > .nav-tabs .active > a,
.tabs-left .nav-tabs .active > a:hover { .tabs-left > .nav-tabs .active > a:hover {
border-color: #ddd transparent #ddd #ddd; border-color: #ddd transparent #ddd #ddd;
*border-right-color: #ffffff; *border-right-color: #ffffff;
} }
.tabs-right .nav-tabs { .tabs-right > .nav-tabs {
float: right; float: right;
margin-left: 19px; margin-left: 19px;
border-left: 1px solid #ddd; border-left: 1px solid #ddd;
} }
.tabs-right .nav-tabs > li > a { .tabs-right > .nav-tabs > li > a {
margin-left: -1px; margin-left: -1px;
-webkit-border-radius: 0 4px 4px 0; -webkit-border-radius: 0 4px 4px 0;
-moz-border-radius: 0 4px 4px 0; -moz-border-radius: 0 4px 4px 0;
border-radius: 0 4px 4px 0; border-radius: 0 4px 4px 0;
} }
.tabs-right .nav-tabs > li > a:hover { .tabs-right > .nav-tabs > li > a:hover {
border-color: #eeeeee #eeeeee #eeeeee #dddddd; border-color: #eeeeee #eeeeee #eeeeee #dddddd;
} }
.tabs-right .nav-tabs .active > a, .tabs-right > .nav-tabs .active > a,
.tabs-right .nav-tabs .active > a:hover { .tabs-right > .nav-tabs .active > a:hover {
border-color: #ddd #ddd #ddd transparent; border-color: #ddd #ddd #ddd transparent;
*border-left-color: #ffffff; *border-left-color: #ffffff;
} }

View File

@ -270,9 +270,9 @@
} }
// Remove border on bottom, left, right // Remove border on bottom, left, right
.tabs-below .nav-tabs, .tabs-below > .nav-tabs,
.tabs-right .nav-tabs, .tabs-right > .nav-tabs,
.tabs-left .nav-tabs { .tabs-left > .nav-tabs {
border-bottom: 0; border-bottom: 0;
} }
@ -290,22 +290,22 @@
// BOTTOM // BOTTOM
// ------ // ------
.tabs-below .nav-tabs { .tabs-below > .nav-tabs {
border-top: 1px solid #ddd; border-top: 1px solid #ddd;
} }
.tabs-below .nav-tabs > li { .tabs-below > .nav-tabs > li {
margin-top: -1px; margin-top: -1px;
margin-bottom: 0; margin-bottom: 0;
} }
.tabs-below .nav-tabs > li > a { .tabs-below > .nav-tabs > li > a {
.border-radius(0 0 4px 4px); .border-radius(0 0 4px 4px);
&:hover { &:hover {
border-bottom-color: transparent; border-bottom-color: transparent;
border-top-color: #ddd; border-top-color: #ddd;
} }
} }
.tabs-below .nav-tabs .active > a, .tabs-below > .nav-tabs > .active > a,
.tabs-below .nav-tabs .active > a:hover { .tabs-below > .nav-tabs > .active > a:hover {
border-color: transparent #ddd #ddd #ddd; border-color: transparent #ddd #ddd #ddd;
} }
@ -313,51 +313,51 @@
// ------------ // ------------
// Common styles // Common styles
.tabs-left .nav-tabs > li, .tabs-left > .nav-tabs > li,
.tabs-right .nav-tabs > li { .tabs-right > .nav-tabs > li {
float: none; float: none;
} }
.tabs-left .nav-tabs > li > a, .tabs-left > .nav-tabs > li > a,
.tabs-right .nav-tabs > li > a { .tabs-right > .nav-tabs > li > a {
min-width: 74px; min-width: 74px;
margin-right: 0; margin-right: 0;
margin-bottom: 3px; margin-bottom: 3px;
} }
// Tabs on the left // Tabs on the left
.tabs-left .nav-tabs { .tabs-left > .nav-tabs {
float: left; float: left;
margin-right: 19px; margin-right: 19px;
border-right: 1px solid #ddd; border-right: 1px solid #ddd;
} }
.tabs-left .nav-tabs > li > a { .tabs-left > .nav-tabs > li > a {
margin-right: -1px; margin-right: -1px;
.border-radius(4px 0 0 4px); .border-radius(4px 0 0 4px);
} }
.tabs-left .nav-tabs > li > a:hover { .tabs-left > .nav-tabs > li > a:hover {
border-color: @grayLighter #ddd @grayLighter @grayLighter; border-color: @grayLighter #ddd @grayLighter @grayLighter;
} }
.tabs-left .nav-tabs .active > a, .tabs-left > .nav-tabs .active > a,
.tabs-left .nav-tabs .active > a:hover { .tabs-left > .nav-tabs .active > a:hover {
border-color: #ddd transparent #ddd #ddd; border-color: #ddd transparent #ddd #ddd;
*border-right-color: @white; *border-right-color: @white;
} }
// Tabs on the right // Tabs on the right
.tabs-right .nav-tabs { .tabs-right > .nav-tabs {
float: right; float: right;
margin-left: 19px; margin-left: 19px;
border-left: 1px solid #ddd; border-left: 1px solid #ddd;
} }
.tabs-right .nav-tabs > li > a { .tabs-right > .nav-tabs > li > a {
margin-left: -1px; margin-left: -1px;
.border-radius(0 4px 4px 0); .border-radius(0 4px 4px 0);
} }
.tabs-right .nav-tabs > li > a:hover { .tabs-right > .nav-tabs > li > a:hover {
border-color: @grayLighter @grayLighter @grayLighter #ddd; border-color: @grayLighter @grayLighter @grayLighter #ddd;
} }
.tabs-right .nav-tabs .active > a, .tabs-right > .nav-tabs .active > a,
.tabs-right .nav-tabs .active > a:hover { .tabs-right > .nav-tabs .active > a:hover {
border-color: #ddd #ddd #ddd transparent; border-color: #ddd #ddd #ddd transparent;
*border-left-color: @white; *border-left-color: @white;
} }

View File

@ -445,6 +445,49 @@
</div> </div>
<!-- Tabs
================================================== -->
<div class="tabbable tabs-left" style="margin-bottom: 18px;">
<ul class="nav nav-tabs">
<li class="active"><a href="#tab1" data-toggle="tab">Section 1</a></li>
<li><a href="#tab2" data-toggle="tab">Section 2</a></li>
<li><a href="#tab3" data-toggle="tab">Section 3</a></li>
</ul>
<div class="tab-content" style="padding-bottom: 9px; border-bottom: 1px solid #ddd;">
<div class="tab-pane active" id="tab1">
<p>I'm in Section 1.</p>
<div class="tabbable" style="background: #f5f5f5; padding: 20px;">
<ul class="nav nav-tabs">
<li class="active"><a href="#tab1-1" data-toggle="tab">1.1</a></li>
<li><a href="#tab1-2" data-toggle="tab">1.2</a></li>
<li><a href="#tab1-3" data-toggle="tab">1.3</a></li>
</ul>
<div class="tab-content" style="padding-bottom: 9px; border-bottom: 1px solid #ddd;">
<div class="tab-pane active" id="tab1-1">
<p>I'm in Section 1.1.</p>
</div>
<div class="tab-pane" id="tab1-2">
<p>I'm in Section 1.2.</p>
</div>
<div class="tab-pane" id="tab1-3">
<p>I'm in Section 1.3.</p>
</div>
</div>
</div>
</div>
<div class="tab-pane" id="tab2">
<p>Howdy, I'm in Section 2.</p>
</div>
<div class="tab-pane" id="tab3">
<p>What up girl, this is Section 3.</p>
</div>
</div>
</div> <!-- /tabbable -->