Bootstrap: .tab-pane has no border or padding

Created on 8 May 2016  路  9Comments  路  Source: twbs/bootstrap

So, when using tabs active tab pane should have a border and padding to look like .. normal.

Here's what seems like right to me:

.tab-pane.active {
    border: 1px solid $nav-tabs-border-color;
    border-top: none;
    padding: $grid-gutter-width / 2;
}
css v4

Most helpful comment

If this is added, it should be entirely opt-in.

Perhaps we could could add a class that would be placed on .tab-content and use a selector like .tab-pane-outline .active for the styling.

All 9 comments

Seems like a matter of taste to me. I can't seem to recall or find any other requests/complaints for such styling.
You can always use a card in the tab pane or around the entire tabs widget to achieve a similar result.
CC: @mdo

I mean isn't this better:

With border

than this?

Without border

Especially when the tab contains text (or at least starts with text).

Is this possible with cards?

Almost, if you add .card.card-block to .tab-content, but the border still requires extra tweaking.

Especially when the tab contains text (or at least starts with text).

Yeah, I agree at least some padding would be nice in that case, but implementing that properly could be fiddly.

Doing it with cards seems like tuning css with javascript :)

If this is added, it should be entirely opt-in.

Perhaps we could could add a class that would be placed on .tab-content and use a selector like .tab-pane-outline .active for the styling.

ok, opt-in is fine. It just should be there in some way.

Closing as a won't fix. There are easy padding utilities now that can accomplish all the spacing, and borders are a preference that don't need to be set initially IMO.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alvarotrigo picture alvarotrigo  路  3Comments

IamManchanda picture IamManchanda  路  3Comments

devfrey picture devfrey  路  3Comments

athimannil picture athimannil  路  3Comments

iklementiev picture iklementiev  路  3Comments