Skip to content

Commit

Permalink
Popovers are now flexible width:
Browse files Browse the repository at this point in the history
* Instead of a fixed width, we use max-width
* Width has been increased from 240px to 280px
* Added ability to hide the title via CSS :empty selector if no title is provided
  • Loading branch information
mdo committed Dec 28, 2012
1 parent f69d12a commit 1c0e4fc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion docs/assets/css/bootstrap.css
Original file line number Diff line number Diff line change
Expand Up @@ -5301,7 +5301,7 @@ input[type="submit"].btn.btn-mini {
left: 0;
z-index: 1010;
display: none;
width: 236px;
max-width: 276px;
padding: 1px;
text-align: left;
white-space: normal;
Expand Down Expand Up @@ -5348,6 +5348,10 @@ input[type="submit"].btn.btn-mini {
border-radius: 5px 5px 0 0;
}

.popover-title:empty {
display: none;
}

.popover-content {
padding: 9px 14px;
}
Expand Down
6 changes: 5 additions & 1 deletion less/popovers.less
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
left: 0;
z-index: @zindexPopover;
display: none;
width: 236px;
max-width: 276px;
padding: 1px;
text-align: left; // Reset given new insertion method
background-color: @popoverBackground;
Expand Down Expand Up @@ -40,6 +40,10 @@
background-color: @popoverTitleBackground;
border-bottom: 1px solid darken(@popoverTitleBackground, 5%);
.border-radius(5px 5px 0 0);

&:empty {
display: none;
}
}

.popover-content {
Expand Down

0 comments on commit 1c0e4fc

Please sign in to comment.