mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-23 09:41:11 +00:00
Holy fucking shit fix that input group with buttons rounded corner noise
This commit is contained in:
parent
b19eb88b5a
commit
bfc4aaf6e8
78
docs/assets/css/bootstrap.css
vendored
78
docs/assets/css/bootstrap.css
vendored
@ -1546,62 +1546,60 @@ select:focus:invalid:focus {
|
|||||||
border-left: 0;
|
border-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-group-btn,
|
.input-group-btn {
|
||||||
.input-group-btn .btn {
|
position: relative;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-group-btn > .btn {
|
.input-group-btn > .btn {
|
||||||
|
position: relative;
|
||||||
float: left;
|
float: left;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-group-btn > .btn + .btn {
|
.input-group-btn > .btn + .btn {
|
||||||
border-left: 0;
|
margin-left: -1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-group-btn.btn-group {
|
.input-group-btn > .btn:hover,
|
||||||
display: table-cell;
|
.input-group-btn > .btn:active {
|
||||||
|
z-index: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-group-btn:first-child > .btn,
|
.input-group-btn:first-child > .btn:first-child,
|
||||||
.input-group-btn.btn-group:first-child > .btn {
|
.input-group-btn:first-child > .dropdown-toggle:first-child {
|
||||||
border-right: 0;
|
border-bottom-left-radius: 4px;
|
||||||
|
border-top-left-radius: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-group-btn:first-child > .btn,
|
.input-group-btn:first-child > .btn:first-child.btn-large,
|
||||||
.input-group-btn.btn-group:first-child > .btn {
|
.input-group-btn:first-child > .dropdown-toggle:first-child.btn-large {
|
||||||
border-radius: 4px 0 0 4px;
|
border-bottom-left-radius: 6px;
|
||||||
|
border-top-left-radius: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-group-btn:first-child > .btn.btn-large,
|
.input-group-btn:first-child > .btn:first-child.btn-small,
|
||||||
.input-group-btn.btn-group:first-child > .btn.btn-large {
|
.input-group-btn:first-child > .dropdown-toggle:first-child.btn-small {
|
||||||
border-radius: 6px 0 0 6px;
|
border-bottom-left-radius: 3px;
|
||||||
|
border-top-left-radius: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-group-btn:first-child > .btn.btn-small,
|
.input-group-btn:last-child > .btn:last-child,
|
||||||
.input-group-btn.btn-group:first-child > .btn.btn-small {
|
.input-group-btn:last-child > .dropdown-toggle {
|
||||||
border-radius: 3px 0 0 3px;
|
border-top-right-radius: 4px;
|
||||||
|
border-bottom-right-radius: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-group-btn:last-child > .btn,
|
.input-group-btn:last-child > .btn:last-child.btn-large,
|
||||||
.input-group-btn.btn-group:last-child > .btn:first-child {
|
.input-group-btn:last-child > .dropdown-toggle.btn-large {
|
||||||
border-left: 0;
|
border-top-right-radius: 6px;
|
||||||
|
border-bottom-right-radius: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-group-btn:last-child > .btn,
|
.input-group-btn:last-child > .btn:last-child.btn-small,
|
||||||
.input-group-btn.btn-group:last-child > .btn {
|
.input-group-btn:last-child > .dropdown-toggle.btn-small {
|
||||||
border-radius: 0 4px 4px 0;
|
border-top-right-radius: 3px;
|
||||||
}
|
border-bottom-right-radius: 3px;
|
||||||
|
|
||||||
.input-group-btn:last-child > .btn.btn-large,
|
|
||||||
.input-group-btn.btn-group:last-child > .btn.btn-large {
|
|
||||||
border-radius: 0 6px 6px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.input-group-btn:last-child > .btn.btn-small,
|
|
||||||
.input-group-btn.btn-group:last-child > .btn.btn-small {
|
|
||||||
border-radius: 0 3px 3px 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (min-width: 768px) {
|
@media screen and (min-width: 768px) {
|
||||||
@ -1642,6 +1640,7 @@ select:focus:invalid:focus {
|
|||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
white-space: nowrap;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border: 1px solid #a7a9aa;
|
border: 1px solid #a7a9aa;
|
||||||
@ -3465,9 +3464,19 @@ button.close {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.btn-group > .btn {
|
.btn-group > .btn {
|
||||||
|
position: relative;
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn-group > .btn + btn {
|
||||||
|
margin-left: -1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-group > .btn:hover,
|
||||||
|
.btn-group > .btn:active {
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
|
||||||
.btn-toolbar:before,
|
.btn-toolbar:before,
|
||||||
.btn-toolbar:after {
|
.btn-toolbar:after {
|
||||||
display: table;
|
display: table;
|
||||||
@ -3560,15 +3569,16 @@ button.close {
|
|||||||
display: block;
|
display: block;
|
||||||
float: none;
|
float: none;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
border-radius: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-group-vertical .btn:first-child {
|
.btn-group-vertical .btn:first-child {
|
||||||
|
border-radius: 0;
|
||||||
border-top-right-radius: 4px;
|
border-top-right-radius: 4px;
|
||||||
border-top-left-radius: 4px;
|
border-top-left-radius: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-group-vertical .btn:last-child {
|
.btn-group-vertical .btn:last-child {
|
||||||
|
border-radius: 0;
|
||||||
border-bottom-right-radius: 4px;
|
border-bottom-right-radius: 4px;
|
||||||
border-bottom-left-radius: 4px;
|
border-bottom-left-radius: 4px;
|
||||||
}
|
}
|
||||||
|
@ -1493,7 +1493,7 @@ For example, <code><section></code> should be wrapped as inline.
|
|||||||
<p></p>
|
<p></p>
|
||||||
<form class="bs-docs-example">
|
<form class="bs-docs-example">
|
||||||
<div class="input-group span7">
|
<div class="input-group span7">
|
||||||
<div class="input-group-btn btn-group">
|
<div class="input-group-btn">
|
||||||
<button class="btn dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
|
<button class="btn dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li><a href="#">Action</a></li>
|
<li><a href="#">Action</a></li>
|
||||||
@ -1508,7 +1508,7 @@ For example, <code><section></code> should be wrapped as inline.
|
|||||||
<br>
|
<br>
|
||||||
<div class="input-group span7">
|
<div class="input-group span7">
|
||||||
<input type="text">
|
<input type="text">
|
||||||
<div class="input-group-btn btn-group">
|
<div class="input-group-btn">
|
||||||
<button class="btn dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
|
<button class="btn dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li><a href="#">Action</a></li>
|
<li><a href="#">Action</a></li>
|
||||||
@ -1522,7 +1522,7 @@ For example, <code><section></code> should be wrapped as inline.
|
|||||||
</form>
|
</form>
|
||||||
{% highlight html linenos %}
|
{% highlight html linenos %}
|
||||||
<div class="input-group span7">
|
<div class="input-group span7">
|
||||||
<div class="input-group-btn btn-group">
|
<div class="input-group-btn">
|
||||||
<button class="btn dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
|
<button class="btn dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li><a href="#">Action</a></li>
|
<li><a href="#">Action</a></li>
|
||||||
@ -1537,7 +1537,7 @@ For example, <code><section></code> should be wrapped as inline.
|
|||||||
|
|
||||||
<div class="input-group span7">
|
<div class="input-group span7">
|
||||||
<input type="text">
|
<input type="text">
|
||||||
<div class="input-group-btn btn-group">
|
<div class="input-group-btn">
|
||||||
<button class="btn dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
|
<button class="btn dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li><a href="#">Action</a></li>
|
<li><a href="#">Action</a></li>
|
||||||
@ -1553,7 +1553,7 @@ For example, <code><section></code> should be wrapped as inline.
|
|||||||
<h4>Segmented dropdown groups</h4>
|
<h4>Segmented dropdown groups</h4>
|
||||||
<form class="bs-docs-example">
|
<form class="bs-docs-example">
|
||||||
<div class="input-group span7">
|
<div class="input-group span7">
|
||||||
<div class="input-group-btn btn-group">
|
<div class="input-group-btn">
|
||||||
<button class="btn" tabindex="-1">Action</button>
|
<button class="btn" tabindex="-1">Action</button>
|
||||||
<button class="btn dropdown-toggle" data-toggle="dropdown" tabindex="-1">
|
<button class="btn dropdown-toggle" data-toggle="dropdown" tabindex="-1">
|
||||||
<span class="caret"></span>
|
<span class="caret"></span>
|
||||||
@ -1573,7 +1573,7 @@ For example, <code><section></code> should be wrapped as inline.
|
|||||||
|
|
||||||
<div class="input-group span7">
|
<div class="input-group span7">
|
||||||
<input type="text">
|
<input type="text">
|
||||||
<div class="input-group-btn btn-group">
|
<div class="input-group-btn">
|
||||||
<button class="btn" tabindex="-1">Action</button>
|
<button class="btn" tabindex="-1">Action</button>
|
||||||
<button class="btn dropdown-toggle" data-toggle="dropdown" tabindex="-1">
|
<button class="btn dropdown-toggle" data-toggle="dropdown" tabindex="-1">
|
||||||
<span class="caret"></span>
|
<span class="caret"></span>
|
||||||
@ -1590,7 +1590,7 @@ For example, <code><section></code> should be wrapped as inline.
|
|||||||
</form>
|
</form>
|
||||||
{% highlight html linenos %}
|
{% highlight html linenos %}
|
||||||
<div class="input-group span7">
|
<div class="input-group span7">
|
||||||
<div class="input-group-btn btn-group">
|
<div class="input-group-btn">
|
||||||
<!-- Button and dropdown menu -->
|
<!-- Button and dropdown menu -->
|
||||||
</div>
|
</div>
|
||||||
<input type="text">
|
<input type="text">
|
||||||
|
@ -16,7 +16,17 @@
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
vertical-align: middle; // match .btn alignment given font-size hack above
|
vertical-align: middle; // match .btn alignment given font-size hack above
|
||||||
> .btn {
|
> .btn {
|
||||||
|
position: relative;
|
||||||
float: left;
|
float: left;
|
||||||
|
// Prevent double borders when buttons are next to each other
|
||||||
|
+ btn {
|
||||||
|
margin-left: -1px;
|
||||||
|
}
|
||||||
|
// Bring the "active" button to the front
|
||||||
|
&:hover,
|
||||||
|
&:active {
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,13 +126,14 @@
|
|||||||
.btn-group-vertical > .btn {
|
.btn-group-vertical > .btn {
|
||||||
display: block;
|
display: block;
|
||||||
float: none;
|
float: none;
|
||||||
border-radius: 0;
|
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
.btn-group-vertical .btn:first-child {
|
.btn-group-vertical .btn:first-child {
|
||||||
|
border-radius: 0; // Needs to be here for specificity since we're not zeroing them out again
|
||||||
.border-top-radius(@border-radius-base);
|
.border-top-radius(@border-radius-base);
|
||||||
}
|
}
|
||||||
.btn-group-vertical .btn:last-child {
|
.btn-group-vertical .btn:last-child {
|
||||||
|
border-radius: 0; // Needs to be here for specificity since we're not zeroing them out again
|
||||||
.border-bottom-radius(@border-radius-base);
|
.border-bottom-radius(@border-radius-base);
|
||||||
}
|
}
|
||||||
.btn-group-vertical .btn-large:first-child {
|
.btn-group-vertical .btn-large:first-child {
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border: 1px solid @btn-border;
|
border: 1px solid @btn-border;
|
||||||
border-radius: @border-radius-base;
|
border-radius: @border-radius-base;
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
&:focus {
|
&:focus {
|
||||||
.tab-focus();
|
.tab-focus();
|
||||||
|
@ -503,52 +503,43 @@ select:focus:invalid {
|
|||||||
|
|
||||||
// Button input groups
|
// Button input groups
|
||||||
// -------------------------
|
// -------------------------
|
||||||
.input-group-btn,
|
.input-group-btn {
|
||||||
.input-group-btn .btn {
|
position: relative;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
.input-group-btn > .btn {
|
.input-group-btn > .btn {
|
||||||
|
position: relative;
|
||||||
float: left; // Collapse white-space
|
float: left; // Collapse white-space
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
+ .btn {
|
+ .btn {
|
||||||
border-left: 0;
|
margin-left: -1px;
|
||||||
|
}
|
||||||
|
// Bring the "active" button to the front
|
||||||
|
&:hover,
|
||||||
|
&:active {
|
||||||
|
z-index: 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.input-group-btn.btn-group {
|
|
||||||
display: table-cell;
|
// Prepended buttons
|
||||||
}
|
.input-group-btn:first-child {
|
||||||
// Prepend
|
// Round the left corners only
|
||||||
.input-group-btn {
|
> .btn:first-child,
|
||||||
&:first-child > .btn,
|
> .dropdown-toggle:first-child {
|
||||||
&.btn-group:first-child > .btn {
|
.border-left-radius(@border-radius-base);
|
||||||
border-right: 0;
|
&.btn-large { .border-left-radius(@border-radius-large); }
|
||||||
}
|
&.btn-small { .border-left-radius(@border-radius-small); }
|
||||||
&:first-child > .btn,
|
|
||||||
&.btn-group:first-child > .btn {
|
|
||||||
border-radius: @border-radius-base 0 0 @border-radius-base;
|
|
||||||
&.btn-large {
|
|
||||||
border-radius:@border-radius-large 0 0 @border-radius-large;
|
|
||||||
}
|
|
||||||
&.btn-small {
|
|
||||||
border-radius:@border-radius-small 0 0 @border-radius-small;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Append
|
|
||||||
.input-group-btn {
|
// Appended buttons
|
||||||
&:last-child > .btn,
|
.input-group-btn:last-child {
|
||||||
&.btn-group:last-child > .btn:first-child {
|
// Round the right corners only
|
||||||
border-left: 0;
|
> .btn:last-child,
|
||||||
}
|
> .dropdown-toggle {
|
||||||
&:last-child > .btn,
|
.border-right-radius(@border-radius-base);
|
||||||
&.btn-group:last-child > .btn {
|
&.btn-large { .border-right-radius(@border-radius-large); }
|
||||||
border-radius: 0 @border-radius-base @border-radius-base 0;
|
&.btn-small { .border-right-radius(@border-radius-small); }
|
||||||
&.btn-large {
|
|
||||||
border-radius: 0 @border-radius-large @border-radius-large 0;
|
|
||||||
}
|
|
||||||
&.btn-small {
|
|
||||||
border-radius: 0 @border-radius-small @border-radius-small 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -557,7 +548,6 @@ select:focus:invalid {
|
|||||||
// Horizontal forms
|
// Horizontal forms
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
@media screen and (min-width: 768px) {
|
@media screen and (min-width: 768px) {
|
||||||
|
|
||||||
.form-horizontal {
|
.form-horizontal {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user