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
9b4e5746
Commit
9b4e5746
authored
Dec 19, 2012
by
Mark Otto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More button tweaks
parent
afef81c0
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
200 additions
and
56 deletions
+200
-56
docs/assets/css/bootstrap.css
docs/assets/css/bootstrap.css
+143
-27
less/button-groups.less
less/button-groups.less
+4
-4
less/buttons.less
less/buttons.less
+12
-12
less/mixins.less
less/mixins.less
+33
-4
less/variables.less
less/variables.less
+8
-9
No files found.
docs/assets/css/bootstrap.css
View file @
9b4e5746
...
...
@@ -180,6 +180,27 @@ textarea {
}
}
/*.buttonBackground(@startColor, @endColor, @text-color: #fff, @textShadow: 0 -1px 0 rgba(0,0,0,.25)) {
color: @text-color;
text-shadow: @textShadow;
#gradient > .vertical(@startColor, @endColor);
border-color: @endColor @endColor darken(@endColor, 15%);
border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) fadein(rgba(0,0,0,.1), 15%);
.reset-filter();
// in these cases the gradient won't cover the background, so we override
&:hover, &:active, &.active, &.disabled, &[disabled] {
color: @text-color;
background-color: @endColor;
}
// IE8 can't handle box-shadow to show active, so we darken a bit ourselves
&:active,
&.active {
background-color: darken(@endColor, 10%) e("\9");
}
}*/
body
{
margin
:
0
;
color
:
#333333
;
...
...
@@ -2541,22 +2562,27 @@ button.close {
.btn
{
display
:
inline-block
;
padding
:
7
px
13px
;
padding
:
6
px
13px
;
margin-bottom
:
0
;
font-size
:
14px
;
font-weight
:
bold
;
line-height
:
20px
;
color
:
#555555
;
text-align
:
center
;
text-shadow
:
0
1px
0
rgba
(
255
,
255
,
255
,
0.75
);
vertical-align
:
middle
;
cursor
:
pointer
;
background-color
:
#eee
;
border
:
0
;
background-color
:
#f0f0f0
;
background-image
:
-moz-linear-gradient
(
top
,
#fafafa
,
#e1e1e1
);
background-image
:
-webkit-gradient
(
linear
,
0
0
,
0
100%
,
from
(
#fafafa
),
to
(
#e1e1e1
));
background-image
:
-webkit-linear-gradient
(
top
,
#fafafa
,
#e1e1e1
);
background-image
:
-o-linear-gradient
(
top
,
#fafafa
,
#e1e1e1
);
background-image
:
linear-gradient
(
to
bottom
,
#fafafa
,
#e1e1e1
);
background-repeat
:
repeat-x
;
border
:
1px
solid
#c7c7c7
;
border-radius
:
4px
;
-webkit-transition
:
all
0.075s
ease-in-out
;
-moz-transition
:
all
0.075s
ease-in-out
;
-o-transition
:
all
0.075s
ease-in-out
;
transition
:
all
0.075s
ease-in-out
;
filter
:
progid
:
DXImageTransform
.
Microsoft
.
gradient
(
startColorstr
=
'#fffafafa'
,
endColorstr
=
'#ffe1e1e1'
,
GradientType
=
0
);
-webkit-box-shadow
:
inset
0
1px
0
rgba
(
255
,
255
,
255
,
0.25
);
box-shadow
:
inset
0
1px
0
rgba
(
255
,
255
,
255
,
0.25
);
}
.btn
:focus
{
...
...
@@ -2567,14 +2593,14 @@ button.close {
.btn
:hover
{
text-decoration
:
none
;
background-color
:
#ddd
;
}
.btn
:active
,
.btn.active
{
background-image
:
none
;
outline
:
0
;
-webkit-box-shadow
:
inset
0
2px
4
px
rgba
(
0
,
0
,
0
,
0.15
),
0
1px
0
rgba
(
255
,
255
,
255
,
0.1
);
box-shadow
:
inset
0
2px
4
px
rgba
(
0
,
0
,
0
,
0.15
),
0
1px
0
rgba
(
255
,
255
,
255
,
0.1
);
-webkit-box-shadow
:
inset
0
3px
5
px
rgba
(
0
,
0
,
0
,
0.15
),
0
1px
0
rgba
(
255
,
255
,
255
,
0.1
);
box-shadow
:
inset
0
3px
5
px
rgba
(
0
,
0
,
0
,
0.15
),
0
1px
0
rgba
(
255
,
255
,
255
,
0.1
);
}
.btn.disabled
,
...
...
@@ -2640,50 +2666,110 @@ input[type="button"].btn-block {
.btn-primary
{
color
:
#ffffff
;
background-color
:
#0088cc
;
text-shadow
:
0
-1px
0
rgba
(
0
,
0
,
0
,
0.25
);
background-color
:
#006dcc
;
background-image
:
-moz-linear-gradient
(
top
,
#0088cc
,
#0044cc
);
background-image
:
-webkit-gradient
(
linear
,
0
0
,
0
100%
,
from
(
#0088cc
),
to
(
#0044cc
));
background-image
:
-webkit-linear-gradient
(
top
,
#0088cc
,
#0044cc
);
background-image
:
-o-linear-gradient
(
top
,
#0088cc
,
#0044cc
);
background-image
:
linear-gradient
(
to
bottom
,
#0088cc
,
#0044cc
);
background-repeat
:
repeat-x
;
border-color
:
#003bb3
;
filter
:
progid
:
DXImageTransform
.
Microsoft
.
gradient
(
startColorstr
=
'#ff0088cc'
,
endColorstr
=
'#ff0044cc'
,
GradientType
=
0
);
}
.btn-primary
:hover
,
.btn-primary
:active
,
.btn-primary.active
{
color
:
#ffffff
;
background-color
:
#006699
;
background-color
:
#0044cc
;
background-position
:
0
-15px
;
}
.btn-primary
:active
,
.btn-primary.active
{
background-image
:
none
;
}
.btn-warning
{
color
:
#ffffff
;
background-color
:
#fbb450
;
text-shadow
:
0
-1px
0
rgba
(
0
,
0
,
0
,
0.25
);
background-color
:
#faa732
;
background-image
:
-moz-linear-gradient
(
top
,
#fbb450
,
#f89406
);
background-image
:
-webkit-gradient
(
linear
,
0
0
,
0
100%
,
from
(
#fbb450
),
to
(
#f89406
));
background-image
:
-webkit-linear-gradient
(
top
,
#fbb450
,
#f89406
);
background-image
:
-o-linear-gradient
(
top
,
#fbb450
,
#f89406
);
background-image
:
linear-gradient
(
to
bottom
,
#fbb450
,
#f89406
);
background-repeat
:
repeat-x
;
border-color
:
#df8505
;
filter
:
progid
:
DXImageTransform
.
Microsoft
.
gradient
(
startColorstr
=
'#fffbb450'
,
endColorstr
=
'#fff89406'
,
GradientType
=
0
);
}
.btn-warning
:hover
,
.btn-warning
:active
,
.btn-warning.active
{
color
:
#ffffff
;
background-color
:
#fa9f1e
;
background-color
:
#f89406
;
background-position
:
0
-15px
;
}
.btn-warning
:active
,
.btn-warning.active
{
background-image
:
none
;
}
.btn-danger
{
color
:
#ffffff
;
background-color
:
#ee5f5b
;
text-shadow
:
0
-1px
0
rgba
(
0
,
0
,
0
,
0.25
);
background-color
:
#da4f49
;
background-image
:
-moz-linear-gradient
(
top
,
#ee5f5b
,
#bd362f
);
background-image
:
-webkit-gradient
(
linear
,
0
0
,
0
100%
,
from
(
#ee5f5b
),
to
(
#bd362f
));
background-image
:
-webkit-linear-gradient
(
top
,
#ee5f5b
,
#bd362f
);
background-image
:
-o-linear-gradient
(
top
,
#ee5f5b
,
#bd362f
);
background-image
:
linear-gradient
(
to
bottom
,
#ee5f5b
,
#bd362f
);
background-repeat
:
repeat-x
;
border-color
:
#a9302a
;
filter
:
progid
:
DXImageTransform
.
Microsoft
.
gradient
(
startColorstr
=
'#ffee5f5b'
,
endColorstr
=
'#ffbd362f'
,
GradientType
=
0
);
}
.btn-danger
:hover
,
.btn-danger
:active
,
.btn-danger.active
{
color
:
#ffffff
;
background-color
:
#e9322d
;
background-color
:
#bd362f
;
background-position
:
0
-15px
;
}
.btn-danger
:active
,
.btn-danger.active
{
background-image
:
none
;
}
.btn-success
{
color
:
#ffffff
;
background-color
:
#62c462
;
text-shadow
:
0
-1px
0
rgba
(
0
,
0
,
0
,
0.25
);
background-color
:
#5bb75b
;
background-image
:
-moz-linear-gradient
(
top
,
#62c462
,
#51a351
);
background-image
:
-webkit-gradient
(
linear
,
0
0
,
0
100%
,
from
(
#62c462
),
to
(
#51a351
));
background-image
:
-webkit-linear-gradient
(
top
,
#62c462
,
#51a351
);
background-image
:
-o-linear-gradient
(
top
,
#62c462
,
#51a351
);
background-image
:
linear-gradient
(
to
bottom
,
#62c462
,
#51a351
);
background-repeat
:
repeat-x
;
border-color
:
#499249
;
filter
:
progid
:
DXImageTransform
.
Microsoft
.
gradient
(
startColorstr
=
'#ff62c462'
,
endColorstr
=
'#ff51a351'
,
GradientType
=
0
);
}
.btn-success
:hover
,
.btn-success
:active
,
.btn-success.active
{
color
:
#ffffff
;
background-color
:
#42b142
;
background-color
:
#51a351
;
background-position
:
0
-15px
;
}
.btn-success
:active
,
.btn-success.active
{
background-image
:
none
;
}
.btn-link
,
...
...
@@ -3469,8 +3555,17 @@ input[type="button"].btn-block {
padding
:
7px
10px
;
margin-right
:
5px
;
margin-left
:
5px
;
color
:
#e5e5e5
;
background-color
:
#f2f2f2
;
color
:
#ffffff
;
text-shadow
:
0
-1px
0
rgba
(
0
,
0
,
0
,
0.25
);
background-color
:
#ededed
;
background-image
:
-moz-linear-gradient
(
top
,
#f2f2f2
,
#e5e5e5
);
background-image
:
-webkit-gradient
(
linear
,
0
0
,
0
100%
,
from
(
#f2f2f2
),
to
(
#e5e5e5
));
background-image
:
-webkit-linear-gradient
(
top
,
#f2f2f2
,
#e5e5e5
);
background-image
:
-o-linear-gradient
(
top
,
#f2f2f2
,
#e5e5e5
);
background-image
:
linear-gradient
(
to
bottom
,
#f2f2f2
,
#e5e5e5
);
background-repeat
:
repeat-x
;
border-color
:
#d9d9d9
;
filter
:
progid
:
DXImageTransform
.
Microsoft
.
gradient
(
startColorstr
=
'#fff2f2f2'
,
endColorstr
=
'#ffe5e5e5'
,
GradientType
=
0
);
-webkit-box-shadow
:
inset
0
1px
0
rgba
(
255
,
255
,
255
,
0.1
),
0
1px
0
rgba
(
255
,
255
,
255
,
0.075
);
box-shadow
:
inset
0
1px
0
rgba
(
255
,
255
,
255
,
0.1
),
0
1px
0
rgba
(
255
,
255
,
255
,
0.075
);
}
...
...
@@ -3478,8 +3573,14 @@ input[type="button"].btn-block {
.navbar
.btn-navbar
:hover
,
.navbar
.btn-navbar
:active
,
.navbar
.btn-navbar.active
{
color
:
#e5e5e5
;
background-color
:
#d9d9d9
;
color
:
#ffffff
;
background-color
:
#e5e5e5
;
background-position
:
0
-15px
;
}
.navbar
.btn-navbar
:active
,
.navbar
.btn-navbar.active
{
background-image
:
none
;
}
.navbar
.btn-navbar
.icon-bar
{
...
...
@@ -3703,15 +3804,30 @@ input[type="button"].btn-block {
}
.navbar-inverse
.btn-navbar
{
color
:
#040404
;
background-color
:
#151515
;
color
:
#ffffff
;
text-shadow
:
0
-1px
0
rgba
(
0
,
0
,
0
,
0.25
);
background-color
:
#0e0e0e
;
background-image
:
-moz-linear-gradient
(
top
,
#151515
,
#040404
);
background-image
:
-webkit-gradient
(
linear
,
0
0
,
0
100%
,
from
(
#151515
),
to
(
#040404
));
background-image
:
-webkit-linear-gradient
(
top
,
#151515
,
#040404
);
background-image
:
-o-linear-gradient
(
top
,
#151515
,
#040404
);
background-image
:
linear-gradient
(
to
bottom
,
#151515
,
#040404
);
background-repeat
:
repeat-x
;
border-color
:
#000000
;
filter
:
progid
:
DXImageTransform
.
Microsoft
.
gradient
(
startColorstr
=
'#ff151515'
,
endColorstr
=
'#ff040404'
,
GradientType
=
0
);
}
.navbar-inverse
.btn-navbar
:hover
,
.navbar-inverse
.btn-navbar
:active
,
.navbar-inverse
.btn-navbar.active
{
color
:
#040404
;
background-color
:
#000000
;
color
:
#ffffff
;
background-color
:
#040404
;
background-position
:
0
-15px
;
}
.navbar-inverse
.btn-navbar
:active
,
.navbar-inverse
.btn-navbar.active
{
background-image
:
none
;
}
.breadcrumb
{
...
...
less/button-groups.less
View file @
9b4e5746
...
...
@@ -126,16 +126,16 @@
background-color: @btn-background-highlight;
}
.btn-primary.dropdown-toggle {
background-color: @btn-backround-primary-highlight;
background-color: @btn-back
g
round-primary-highlight;
}
.btn-warning.dropdown-toggle {
background-color: @btn-backround-warning-highlight;
background-color: @btn-back
g
round-warning-highlight;
}
.btn-danger.dropdown-toggle {
background-color: @btn-backround-danger-highlight;
background-color: @btn-back
g
round-danger-highlight;
}
.btn-success.dropdown-toggle {
background-color: @btn-backround-success-highlight;
background-color: @btn-back
g
round-success-highlight;
}
}
...
...
less/buttons.less
View file @
9b4e5746
...
...
@@ -9,19 +9,19 @@
// Core styles
.btn {
display: inline-block;
padding:
7
px 13px;
padding:
6
px 13px;
margin-bottom: 0; // For input.btn
font-size: @font-size-base;
font-weight: bold;
line-height: @line-height-base;
text-align: center;
color: @gray;
text-align: center;
text-shadow: 0 1px 0 rgba(255,255,255,.75);
vertical-align: middle;
cursor: pointer;
background-color: #eee
;
border:
0
;
#gradient > .vertical(@btn-background, @btn-background-highlight)
;
border:
1px solid darken(@btn-background, 20%)
;
border-radius: @border-radius-base;
.
transition(all .075s ease-in-out
);
.
box-shadow(inset 0 1px 0 rgba(255,255,255,.25)
);
&:focus {
.tab-focus();
...
...
@@ -29,13 +29,13 @@
&:hover {
text-decoration: none;
background-color: #ddd;
}
&:active,
&.active {
outline: 0;
.box-shadow(~"inset 0 2px 4px rgba(0,0,0,.15), 0 1px 0 rgba(255,255,255,.1)");
background-image: none;
.box-shadow(~"inset 0 3px 5px rgba(0,0,0,.15), 0 1px 0 rgba(255,255,255,.1)");
}
&.disabled,
...
...
@@ -116,19 +116,19 @@ input[type="button"] {
// --------------------------------------------------
.btn-primary {
.buttonBackground(@btn-back
round-primary
);
.buttonBackground(@btn-back
ground-primary, @btn-background-primary-highlight
);
}
// Warning appears are orange
.btn-warning {
.buttonBackground(@btn-back
round-warning
);
.buttonBackground(@btn-back
ground-warning, @btn-background-warning-highlight
);
}
// Danger and error appear as red
.btn-danger {
.buttonBackground(@btn-back
round-danger
);
.buttonBackground(@btn-back
ground-danger, @btn-background-danger-highlight
);
}
// Success appears as green
.btn-success {
.buttonBackground(@btn-back
round-success
);
.buttonBackground(@btn-back
ground-success, @btn-background-success-highlight
);
}
...
...
less/mixins.less
View file @
9b4e5746
...
...
@@ -405,17 +405,46 @@
// Button backgrounds
// ------------------
.buttonBackground(@background-color: #333, @text-color: #fff
) {
/*.buttonBackground(@startColor, @endColor, @text-color: #fff, @textShadow: 0 -1px 0 rgba(0,0,0,.25)
) {
color: @text-color;
background-color: @background-color;
text-shadow: @textShadow;
#gradient > .vertical(@startColor, @endColor);
border-color: @endColor @endColor darken(@endColor, 15%);
border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) fadein(rgba(0,0,0,.1), 15%);
.reset-filter();
// in these cases the gradient won't cover the background, so we override
&:hover, &:active, &.active, &.disabled, &[disabled] {
color: @text-color;
background-color: @endColor;
}
// IE8 can't handle box-shadow to show active, so we darken a bit ourselves
&:active,
&.active {
background-color: darken(@endColor, 10%) e("\9");
}
}*/
// Button backgrounds
// ------------------
.buttonBackground(@background-start, @background-end, @text-color: #fff, @text-shadow: 0 -1px 0 rgba(0,0,0,.25)) {
color: @text-color;
text-shadow: @text-shadow;
#gradient > .vertical(@background-start, @background-end);
border-color: darken(@background-end, 5%);
&:hover,
&:active,
&.active {
color: @text-color;
background-color: darken(@background-color, 10%);
background-position: 0 -15px;
background-color: @background-end;
}
&:active,
&.active {
background-image: none;
}
}
...
...
less/variables.less
View file @
9b4e5746
...
...
@@ -77,19 +77,18 @@
@btn-background: #fafafa;
@btn-background-highlight: darken(@btn-background, 10%);
@btn-border: #bbb;
@btn-backround-primary: @link-color;
@btn-back
round-primary-highlight: spin(@btn-back
round-primary, 20%);
@btn-back
g
round-primary: @link-color;
@btn-back
ground-primary-highlight: spin(@btn-backg
round-primary, 20%);
@btn-backround-success: #62c462;
@btn-backround-success-highlight: #51a351;
@btn-back
g
round-success: #62c462;
@btn-back
g
round-success-highlight: #51a351;
@btn-backround-warning: lighten(#f89406, 15%);
@btn-backround-warning-highlight: #f89406;
@btn-back
g
round-warning: lighten(#f89406, 15%);
@btn-back
g
round-warning-highlight: #f89406;
@btn-backround-danger: #ee5f5b;
@btn-backround-danger-highlight: #bd362f;
@btn-back
g
round-danger: #ee5f5b;
@btn-back
g
round-danger-highlight: #bd362f;
// Forms
...
...
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