Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bootstrap
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bootstrap
Commits
c11f41ba
Commit
c11f41ba
authored
Dec 21, 2012
by
Mark Otto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
flatten buttons and forms
parent
7c04d573
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
74 additions
and
238 deletions
+74
-238
docs/assets/css/bootstrap.css
docs/assets/css/bootstrap.css
+31
-189
docs/components.html
docs/components.html
+4
-4
docs/templates/pages/components.mustache
docs/templates/pages/components.mustache
+4
-4
less/button-groups.less
less/button-groups.less
+13
-29
less/buttons.less
less/buttons.less
+15
-8
less/forms.less
less/forms.less
+3
-2
less/navbar.less
less/navbar.less
+4
-2
No files found.
docs/assets/css/bootstrap.css
View file @
c11f41ba
This diff is collapsed.
Click to expand it.
docs/components.html
View file @
c11f41ba
...
@@ -223,10 +223,10 @@
...
@@ -223,10 +223,10 @@
<p>
Make a set of buttons appear vertically stacked rather than horizontally.
</p>
<p>
Make a set of buttons appear vertically stacked rather than horizontally.
</p>
<div
class=
"bs-docs-example"
>
<div
class=
"bs-docs-example"
>
<div
class=
"btn-group btn-group-vertical"
>
<div
class=
"btn-group btn-group-vertical"
>
<button
type=
"button"
class=
"btn"
><i
class=
"icon-align-left"
></i></button>
<button
type=
"button"
class=
"btn"
><i
class=
"
glyph
icon-align-left"
></i></button>
<button
type=
"button"
class=
"btn"
><i
class=
"icon-align-center"
></i></button>
<button
type=
"button"
class=
"btn"
><i
class=
"
glyph
icon-align-center"
></i></button>
<button
type=
"button"
class=
"btn"
><i
class=
"icon-align-right"
></i></button>
<button
type=
"button"
class=
"btn"
><i
class=
"
glyph
icon-align-right"
></i></button>
<button
type=
"button"
class=
"btn"
><i
class=
"icon-align-justify"
></i></button>
<button
type=
"button"
class=
"btn"
><i
class=
"
glyph
icon-align-justify"
></i></button>
</div>
</div>
</div>
</div>
<pre
class=
"prettyprint linenums"
>
<pre
class=
"prettyprint linenums"
>
...
...
docs/templates/pages/components.mustache
View file @
c11f41ba
...
@@ -155,10 +155,10 @@
...
@@ -155,10 +155,10 @@
<p>
Make a set of buttons appear vertically stacked rather than horizontally.
</p>
<p>
Make a set of buttons appear vertically stacked rather than horizontally.
</p>
<div
class=
"bs-docs-example"
>
<div
class=
"bs-docs-example"
>
<div
class=
"btn-group btn-group-vertical"
>
<div
class=
"btn-group btn-group-vertical"
>
<button
type=
"button"
class=
"btn"
><i
class=
"icon-align-left"
></i></button>
<button
type=
"button"
class=
"btn"
><i
class=
"
glyph
icon-align-left"
></i></button>
<button
type=
"button"
class=
"btn"
><i
class=
"icon-align-center"
></i></button>
<button
type=
"button"
class=
"btn"
><i
class=
"
glyph
icon-align-center"
></i></button>
<button
type=
"button"
class=
"btn"
><i
class=
"icon-align-right"
></i></button>
<button
type=
"button"
class=
"btn"
><i
class=
"
glyph
icon-align-right"
></i></button>
<button
type=
"button"
class=
"btn"
><i
class=
"icon-align-justify"
></i></button>
<button
type=
"button"
class=
"btn"
><i
class=
"
glyph
icon-align-justify"
></i></button>
</div>
</div>
</div>
</div>
<pre
class=
"prettyprint linenums"
>
<pre
class=
"prettyprint linenums"
>
...
...
less/button-groups.less
View file @
c11f41ba
...
@@ -7,24 +7,23 @@
...
@@ -7,24 +7,23 @@
.btn-group {
.btn-group {
position: relative;
position: relative;
display: inline-block;
display: inline-block;
font-size: 0; // remove as part 1 of font-size inline-block hack
vertical-align: middle; // match .btn alignment given font-size hack above
vertical-align: middle; // match .btn alignment given font-size hack above
white-space: nowrap; // prevent buttons from wrapping when in tight spaces (e.g., the table on the tests page)
> .btn {
}
float: left;
}
// Space out series of button groups
.btn-group + .btn-group {
margin-left: 5px;
}
}
// Optional: Group multiple button groups together for a toolbar
// Optional: Group multiple button groups together for a toolbar
.btn-toolbar {
.btn-toolbar {
font-size: 0; // Hack to remove whitespace that results from using inline-block
.clearfix();
margin-top: @line-height-base / 2;
.btn-group {
margin-bottom: @line-height-base / 2;
float: left;
}
// Space out series of button groups
> .btn + .btn,
> .btn + .btn,
> .btn-group + .btn,
> .btn-group + .btn,
> .btn + .btn-group {
> .btn + .btn-group,
> .btn-group + .btn-group {
margin-left: 5px;
margin-left: 5px;
}
}
}
}
...
@@ -35,12 +34,7 @@
...
@@ -35,12 +34,7 @@
border-radius: 0;
border-radius: 0;
}
}
.btn-group > .btn + .btn {
.btn-group > .btn + .btn {
margin-left: -1px;
margin-left: 1px;
}
.btn-group > .btn,
.btn-group > .dropdown-menu,
.btn-group > .popover {
font-size: @font-size-base; // redeclare as part 2 of font-size inline-block hack
}
}
// Reset fonts for other sizes
// Reset fonts for other sizes
...
@@ -78,14 +72,6 @@
...
@@ -78,14 +72,6 @@
border-bottom-right-radius: @border-radius-large;
border-bottom-right-radius: @border-radius-large;
}
}
// On hover/focus/active, bring the proper btn to front
.btn-group > .btn:hover,
.btn-group > .btn:focus,
.btn-group > .btn:active,
.btn-group > .btn.active {
z-index: 2;
}
// On active and open, don't show outline
// On active and open, don't show outline
.btn-group .dropdown-toggle:active,
.btn-group .dropdown-toggle:active,
.btn-group.open .dropdown-toggle {
.btn-group.open .dropdown-toggle {
...
@@ -101,7 +87,6 @@
...
@@ -101,7 +87,6 @@
.btn-group > .btn + .dropdown-toggle {
.btn-group > .btn + .dropdown-toggle {
padding-left: 8px;
padding-left: 8px;
padding-right: 8px;
padding-right: 8px;
.box-shadow(~"inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05)");
}
}
.btn-group > .btn-mini + .dropdown-toggle {
.btn-group > .btn-mini + .dropdown-toggle {
padding-left: 5px;
padding-left: 5px;
...
@@ -118,7 +103,7 @@
...
@@ -118,7 +103,7 @@
// Remove the gradient and set the same inset shadow as the :active state
// Remove the gradient and set the same inset shadow as the :active state
.dropdown-toggle {
.dropdown-toggle {
background-image: none;
background-image: none;
.box-shadow(
~"inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05)"
);
.box-shadow(
inset 0 2px 4px rgba(0,0,0,.15)
);
}
}
// Keep the hover's background when dropdown is open
// Keep the hover's background when dropdown is open
...
@@ -184,7 +169,6 @@
...
@@ -184,7 +169,6 @@
// ----------------------
// ----------------------
.btn-group-vertical {
.btn-group-vertical {
display: inline-block; // Make buttons only take up the width they need
}
}
.btn-group-vertical > .btn {
.btn-group-vertical > .btn {
display: block;
display: block;
...
@@ -194,7 +178,7 @@
...
@@ -194,7 +178,7 @@
}
}
.btn-group-vertical > .btn + .btn {
.btn-group-vertical > .btn + .btn {
margin-left: 0;
margin-left: 0;
margin-top:
-
1px;
margin-top: 1px;
}
}
.btn-group-vertical .btn:first-child {
.btn-group-vertical .btn:first-child {
border-radius: @border-radius-base @border-radius-base 0 0;
border-radius: @border-radius-base @border-radius-base 0 0;
...
...
less/buttons.less
View file @
c11f41ba
...
@@ -9,16 +9,17 @@
...
@@ -9,16 +9,17 @@
// Core styles
// Core styles
.btn {
.btn {
display: inline-block;
display: inline-block;
padding:
6
px 13px;
padding:
7
px 13px;
margin-bottom: 0; // For input.btn
margin-bottom: 0; // For input.btn
font-size: @font-size-base;
font-size: @font-size-base;
font-weight: bold;
line-height: @line-height-base;
line-height: @line-height-base;
text-align: center;
text-align: center;
vertical-align: middle;
vertical-align: middle;
cursor: pointer;
cursor: pointer;
border:
1px solid #ccc
;
border:
0
;
border-radius: @border-radius-base;
border-radius: @border-radius-base;
.box-shadow(inset 0 1px 0 rgba(255,255,255,.25));
//
.box-shadow(inset 0 1px 0 rgba(255,255,255,.25));
&:focus {
&:focus {
.tab-focus();
.tab-focus();
...
@@ -114,23 +115,29 @@ input[type="button"] {
...
@@ -114,23 +115,29 @@ input[type="button"] {
// --------------------------------------------------
// --------------------------------------------------
.btn {
.btn {
.buttonBackground(@btn-background, @btn-background-highlight, @gray, 0 1px 0 rgba(255,255,255,.75));
color: #fff;
background-color: #ccc;
//.buttonBackground(@btn-background, @btn-background-highlight, @gray, 0 1px 0 rgba(255,255,255,.75));
}
}
// Primary appears as blue
// Primary appears as blue
.btn-primary {
.btn-primary {
.buttonBackground(@btn-background-primary, @btn-background-primary-highlight);
background-color: @btn-background-primary;
//.buttonBackground(@btn-background-primary, @btn-background-primary-highlight);
}
}
// Warning appears are orange
// Warning appears are orange
.btn-warning {
.btn-warning {
.buttonBackground(@btn-background-warning, @btn-background-warning-highlight);
background-color: @btn-background-warning;
//.buttonBackground(@btn-background-warning, @btn-background-warning-highlight);
}
}
// Danger and error appear as red
// Danger and error appear as red
.btn-danger {
.btn-danger {
.buttonBackground(@btn-background-danger, @btn-background-danger-highlight);
background-color: @btn-background-danger;
//.buttonBackground(@btn-background-danger, @btn-background-danger-highlight);
}
}
// Success appears as green
// Success appears as green
.btn-success {
.btn-success {
.buttonBackground(@btn-background-success, @btn-background-success-highlight);
background-color: @btn-background-success;
//.buttonBackground(@btn-background-success, @btn-background-success-highlight);
}
}
...
...
less/forms.less
View file @
c11f41ba
...
@@ -67,7 +67,7 @@ input[type="color"],
...
@@ -67,7 +67,7 @@ input[type="color"],
background-color: @input-background;
background-color: @input-background;
border: 1px solid @input-border;
border: 1px solid @input-border;
border-radius: @input-border-radius;
border-radius: @input-border-radius;
.box-shadow(inset 0 1px 1px rgba(0,0,0,.075));
//
.box-shadow(inset 0 1px 1px rgba(0,0,0,.075));
.transition(~"border linear .2s, box-shadow linear .2s");
.transition(~"border linear .2s, box-shadow linear .2s");
}
}
...
@@ -118,7 +118,8 @@ input[type="color"],
...
@@ -118,7 +118,8 @@ input[type="color"],
border-color: rgba(82,168,236,.8);
border-color: rgba(82,168,236,.8);
outline: 0;
outline: 0;
outline: thin dotted \9; /* IE6-9 */
outline: thin dotted \9; /* IE6-9 */
.box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6)");
//.box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6)");
.box-shadow(0 0 8px rgba(82,168,236,.6));
}
}
}
}
...
...
less/navbar.less
View file @
c11f41ba
...
@@ -11,7 +11,8 @@
...
@@ -11,7 +11,8 @@
overflow: visible;
overflow: visible;
padding: 0 20px;
padding: 0 20px;
margin-bottom: @line-height-base;
margin-bottom: @line-height-base;
#gradient > .vertical(@navbar-background-highlight, @navbar-background);
background-color: @navbar-background;
//#gradient > .vertical(@navbar-background-highlight, @navbar-background);
border: 1px solid @navbar-border;
border: 1px solid @navbar-border;
border-radius: @border-radius-base;
border-radius: @border-radius-base;
.box-shadow(0 1px 4px rgba(0,0,0,.065));
.box-shadow(0 1px 4px rgba(0,0,0,.065));
...
@@ -362,7 +363,8 @@
...
@@ -362,7 +363,8 @@
// -------------------------
// -------------------------
.navbar-inverse {
.navbar-inverse {
#gradient > .vertical(@navbar-inverse-background-highlight, @navbar-inverse-background);
background-color: @navbar-inverse-background;
//#gradient > .vertical(@navbar-inverse-background-highlight, @navbar-inverse-background);
border-color: @navbar-inverse-border;
border-color: @navbar-inverse-border;
.brand,
.brand,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment