bootstrap-generators 1.4.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +238 -21
- data/bootstrap-generators.gemspec +3 -3
- data/lib/bootstrap-generators.rb +0 -1
- data/lib/bootstrap/generators/version.rb +1 -1
- data/lib/generators/bootstrap/install/install_generator.rb +5 -12
- data/lib/generators/bootstrap/install/templates/assets/stylesheets/fluid.css +5 -5
- data/lib/generators/bootstrap/install/templates/assets/stylesheets/fluid.css.less +119 -0
- data/lib/generators/bootstrap/install/templates/assets/stylesheets/fluid.css.scss +5 -5
- data/lib/generators/bootstrap/install/templates/assets/stylesheets/hero.css +0 -5
- data/lib/generators/bootstrap/install/templates/assets/stylesheets/hero.css.less +114 -0
- data/lib/generators/bootstrap/install/templates/assets/stylesheets/hero.css.scss +0 -5
- data/lib/generators/bootstrap/install/templates/config/initializers/simple_form.rb +118 -40
- data/lib/generators/bootstrap/install/templates/config/locales/simple_form.en.yml +24 -0
- data/lib/generators/bootstrap/install/templates/form_builders/form_builder/_form.html.erb +9 -8
- data/lib/generators/bootstrap/install/templates/form_builders/form_builder/_form.html.haml +8 -7
- data/lib/generators/bootstrap/install/templates/form_builders/simple_form/_form.html.erb +5 -7
- data/lib/generators/bootstrap/install/templates/form_builders/simple_form/_form.html.haml +6 -7
- data/lib/generators/bootstrap/install/templates/layouts/fluid.html.erb +50 -47
- data/lib/generators/bootstrap/install/templates/layouts/fluid.html.haml +75 -55
- data/lib/generators/bootstrap/install/templates/layouts/hero.html.erb +11 -14
- data/lib/generators/bootstrap/install/templates/layouts/hero.html.haml +9 -11
- data/lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/edit.html.erb +8 -2
- data/lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/index.html.erb +5 -2
- data/lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/new.html.erb +4 -1
- data/lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/show.html.erb +8 -2
- data/lib/generators/bootstrap/install/templates/lib/templates/haml/scaffold/edit.html.haml +6 -2
- data/lib/generators/bootstrap/install/templates/lib/templates/haml/scaffold/index.html.haml +4 -2
- data/lib/generators/bootstrap/install/templates/lib/templates/haml/scaffold/new.html.haml +3 -1
- data/lib/generators/bootstrap/install/templates/lib/templates/haml/scaffold/show.html.haml +6 -2
- data/test/lib/generators/bootstrap/install_generator_test.rb +6 -20
- data/test/test_helper.rb +1 -1
- data/vendor/assets/images/glyphicons-halflings-white.png +0 -0
- data/vendor/assets/images/glyphicons-halflings.png +0 -0
- data/vendor/assets/javascripts/bootstrap-alert.js +91 -0
- data/vendor/assets/javascripts/bootstrap-button.js +98 -0
- data/vendor/assets/javascripts/bootstrap-carousel.js +154 -0
- data/vendor/assets/javascripts/bootstrap-collapse.js +136 -0
- data/vendor/assets/javascripts/bootstrap-dropdown.js +58 -21
- data/vendor/assets/javascripts/bootstrap-modal.js +63 -114
- data/vendor/assets/javascripts/bootstrap-popover.js +38 -33
- data/vendor/assets/javascripts/bootstrap-scrollspy.js +62 -44
- data/vendor/assets/javascripts/bootstrap-tab.js +130 -0
- data/vendor/assets/javascripts/bootstrap-tooltip.js +270 -0
- data/vendor/assets/javascripts/bootstrap-transition.js +51 -0
- data/vendor/assets/javascripts/bootstrap-typeahead.js +271 -0
- data/vendor/assets/javascripts/bootstrap.js +11 -6
- data/vendor/assets/stylesheets/bootstrap.css +2497 -1602
- data/vendor/assets/stylesheets/less/accordion.less +28 -0
- data/vendor/assets/stylesheets/less/alerts.less +70 -0
- data/vendor/assets/stylesheets/less/bootstrap.less +62 -0
- data/vendor/assets/stylesheets/less/breadcrumbs.less +22 -0
- data/vendor/assets/stylesheets/less/button-groups.less +147 -0
- data/vendor/assets/stylesheets/less/buttons.less +165 -0
- data/vendor/assets/stylesheets/less/carousel.less +121 -0
- data/vendor/assets/stylesheets/less/close.less +18 -0
- data/vendor/assets/stylesheets/less/code.less +44 -0
- data/vendor/assets/stylesheets/less/component-animations.less +18 -0
- data/vendor/assets/stylesheets/less/dropdowns.less +131 -0
- data/vendor/assets/stylesheets/less/forms.less +515 -0
- data/vendor/assets/stylesheets/less/grid.less +8 -0
- data/vendor/assets/stylesheets/less/hero-unit.less +20 -0
- data/vendor/assets/stylesheets/less/labels.less +16 -0
- data/vendor/assets/stylesheets/less/layouts.less +17 -0
- data/vendor/assets/stylesheets/less/mixins.less +537 -0
- data/vendor/assets/stylesheets/less/modals.less +72 -0
- data/vendor/assets/stylesheets/less/navbar.less +292 -0
- data/vendor/assets/stylesheets/less/navs.less +344 -0
- data/vendor/assets/stylesheets/less/pager.less +30 -0
- data/vendor/assets/stylesheets/less/pagination.less +55 -0
- data/vendor/assets/stylesheets/less/popovers.less +49 -0
- data/vendor/assets/stylesheets/less/progress-bars.less +95 -0
- data/vendor/assets/stylesheets/less/reset.less +126 -0
- data/vendor/assets/stylesheets/less/responsive.less +323 -0
- data/vendor/assets/stylesheets/less/scaffolding.less +29 -0
- data/vendor/assets/stylesheets/less/sprites.less +156 -0
- data/vendor/assets/stylesheets/less/tables.less +139 -0
- data/vendor/assets/stylesheets/less/thumbnails.less +35 -0
- data/vendor/assets/stylesheets/less/tooltip.less +35 -0
- data/vendor/assets/stylesheets/less/type.less +217 -0
- data/vendor/assets/stylesheets/less/utilities.less +23 -0
- data/vendor/assets/stylesheets/less/variables.less +99 -0
- data/vendor/assets/stylesheets/less/wells.less +17 -0
- metadata +62 -33
- data/lib/bootstrap/helpers/form_builder.rb +0 -26
- data/lib/generators/bootstrap/install/templates/app/inputs/boolean_input.rb +0 -12
- data/lib/generators/bootstrap/install/templates/app/inputs/collection_input.rb +0 -12
- data/lib/generators/bootstrap/install/templates/app/inputs/date_time_input.rb +0 -16
- data/lib/generators/bootstrap/install/templates/app/inputs/file_input.rb +0 -16
- data/lib/generators/bootstrap/install/templates/app/inputs/numeric_input.rb +0 -16
- data/lib/generators/bootstrap/install/templates/app/inputs/password_input.rb +0 -16
- data/lib/generators/bootstrap/install/templates/app/inputs/string_input.rb +0 -16
- data/lib/generators/bootstrap/install/templates/app/inputs/text_input.rb +0 -16
- data/lib/generators/bootstrap/install/templates/assets/stylesheets/container-app.css +0 -53
- data/lib/generators/bootstrap/install/templates/assets/stylesheets/container-app.css.scss +0 -55
- data/lib/generators/bootstrap/install/templates/layouts/container-app.html.erb +0 -58
- data/lib/generators/bootstrap/install/templates/layouts/container-app.html.haml +0 -46
- data/vendor/assets/javascripts/bootstrap-alerts.js +0 -113
- data/vendor/assets/javascripts/bootstrap-buttons.js +0 -62
- data/vendor/assets/javascripts/bootstrap-tabs.js +0 -80
- data/vendor/assets/javascripts/bootstrap-twipsy.js +0 -321
- data/vendor/assets/stylesheets/bootstrap.min.css +0 -356
@@ -0,0 +1,28 @@
|
|
1
|
+
// ACCORDION
|
2
|
+
// ---------
|
3
|
+
|
4
|
+
|
5
|
+
// Parent container
|
6
|
+
.accordion {
|
7
|
+
margin-bottom: @baseLineHeight;
|
8
|
+
}
|
9
|
+
|
10
|
+
// Group == heading + body
|
11
|
+
.accordion-group {
|
12
|
+
margin-bottom: 2px;
|
13
|
+
border: 1px solid #e5e5e5;
|
14
|
+
.border-radius(4px);
|
15
|
+
}
|
16
|
+
.accordion-heading {
|
17
|
+
border-bottom: 0;
|
18
|
+
}
|
19
|
+
.accordion-heading .accordion-toggle {
|
20
|
+
display: block;
|
21
|
+
padding: 8px 15px;
|
22
|
+
}
|
23
|
+
|
24
|
+
// Inner needs the styles because you can't animate properly with any styles on the element
|
25
|
+
.accordion-inner {
|
26
|
+
padding: 9px 15px;
|
27
|
+
border-top: 1px solid #e5e5e5;
|
28
|
+
}
|
@@ -0,0 +1,70 @@
|
|
1
|
+
// ALERT STYLES
|
2
|
+
// ------------
|
3
|
+
|
4
|
+
// Base alert styles
|
5
|
+
.alert {
|
6
|
+
padding: 8px 35px 8px 14px;
|
7
|
+
margin-bottom: @baseLineHeight;
|
8
|
+
text-shadow: 0 1px 0 rgba(255,255,255,.5);
|
9
|
+
background-color: @warningBackground;
|
10
|
+
border: 1px solid @warningBorder;
|
11
|
+
.border-radius(4px);
|
12
|
+
}
|
13
|
+
.alert,
|
14
|
+
.alert-heading {
|
15
|
+
color: @warningText;
|
16
|
+
}
|
17
|
+
|
18
|
+
// Adjust close link position
|
19
|
+
.alert .close {
|
20
|
+
position: relative;
|
21
|
+
top: -2px;
|
22
|
+
right: -21px;
|
23
|
+
line-height: 18px;
|
24
|
+
}
|
25
|
+
|
26
|
+
// Alternate styles
|
27
|
+
// ----------------
|
28
|
+
|
29
|
+
.alert-success {
|
30
|
+
background-color: @successBackground;
|
31
|
+
border-color: @successBorder;
|
32
|
+
}
|
33
|
+
.alert-success,
|
34
|
+
.alert-success .alert-heading {
|
35
|
+
color: @successText;
|
36
|
+
}
|
37
|
+
.alert-danger,
|
38
|
+
.alert-error {
|
39
|
+
background-color: @errorBackground;
|
40
|
+
border-color: @errorBorder;
|
41
|
+
}
|
42
|
+
.alert-danger,
|
43
|
+
.alert-error,
|
44
|
+
.alert-danger .alert-heading,
|
45
|
+
.alert-error .alert-heading {
|
46
|
+
color: @errorText;
|
47
|
+
}
|
48
|
+
.alert-info {
|
49
|
+
background-color: @infoBackground;
|
50
|
+
border-color: @infoBorder;
|
51
|
+
}
|
52
|
+
.alert-info,
|
53
|
+
.alert-info .alert-heading {
|
54
|
+
color: @infoText;
|
55
|
+
}
|
56
|
+
|
57
|
+
|
58
|
+
// Block alerts
|
59
|
+
// ------------------------
|
60
|
+
.alert-block {
|
61
|
+
padding-top: 14px;
|
62
|
+
padding-bottom: 14px;
|
63
|
+
}
|
64
|
+
.alert-block > p,
|
65
|
+
.alert-block > ul {
|
66
|
+
margin-bottom: 0;
|
67
|
+
}
|
68
|
+
.alert-block p + p {
|
69
|
+
margin-top: 5px;
|
70
|
+
}
|
@@ -0,0 +1,62 @@
|
|
1
|
+
/*!
|
2
|
+
* Bootstrap v2.0.0
|
3
|
+
*
|
4
|
+
* Copyright 2012 Twitter, Inc
|
5
|
+
* Licensed under the Apache License v2.0
|
6
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
7
|
+
*
|
8
|
+
* Designed and built with all the love in the world @twitter by @mdo and @fat.
|
9
|
+
*/
|
10
|
+
|
11
|
+
// CSS Reset
|
12
|
+
@import "reset.less";
|
13
|
+
|
14
|
+
// Core variables and mixins
|
15
|
+
@import "variables.less"; // Modify this for custom colors, font-sizes, etc
|
16
|
+
@import "mixins.less";
|
17
|
+
|
18
|
+
// Grid system and page structure
|
19
|
+
@import "scaffolding.less";
|
20
|
+
@import "grid.less";
|
21
|
+
@import "layouts.less";
|
22
|
+
|
23
|
+
// Base CSS
|
24
|
+
@import "type.less";
|
25
|
+
@import "code.less";
|
26
|
+
@import "forms.less";
|
27
|
+
@import "tables.less";
|
28
|
+
|
29
|
+
// Components: common
|
30
|
+
@import "sprites.less";
|
31
|
+
@import "dropdowns.less";
|
32
|
+
@import "wells.less";
|
33
|
+
@import "component-animations.less";
|
34
|
+
@import "close.less";
|
35
|
+
|
36
|
+
// Components: Buttons & Alerts
|
37
|
+
@import "buttons.less";
|
38
|
+
@import "button-groups.less";
|
39
|
+
@import "alerts.less"; // Note: alerts share common CSS with buttons and thus have styles in buttons.less
|
40
|
+
|
41
|
+
// Components: Nav
|
42
|
+
@import "navs.less";
|
43
|
+
@import "navbar.less";
|
44
|
+
@import "breadcrumbs.less";
|
45
|
+
@import "pagination.less";
|
46
|
+
@import "pager.less";
|
47
|
+
|
48
|
+
// Components: Popovers
|
49
|
+
@import "modals.less";
|
50
|
+
@import "tooltip.less";
|
51
|
+
@import "popovers.less";
|
52
|
+
|
53
|
+
// Components: Misc
|
54
|
+
@import "thumbnails.less";
|
55
|
+
@import "labels.less";
|
56
|
+
@import "progress-bars.less";
|
57
|
+
@import "accordion.less";
|
58
|
+
@import "carousel.less";
|
59
|
+
@import "hero-unit.less";
|
60
|
+
|
61
|
+
// Utility classes
|
62
|
+
@import "utilities.less"; // Has to be last to override when necessary
|
@@ -0,0 +1,22 @@
|
|
1
|
+
// BREADCRUMBS
|
2
|
+
// -----------
|
3
|
+
|
4
|
+
.breadcrumb {
|
5
|
+
padding: 7px 14px;
|
6
|
+
margin: 0 0 @baseLineHeight;
|
7
|
+
#gradient > .vertical(@white, #f5f5f5);
|
8
|
+
border: 1px solid #ddd;
|
9
|
+
.border-radius(3px);
|
10
|
+
.box-shadow(inset 0 1px 0 @white);
|
11
|
+
li {
|
12
|
+
display: inline;
|
13
|
+
text-shadow: 0 1px 0 @white;
|
14
|
+
}
|
15
|
+
.divider {
|
16
|
+
padding: 0 5px;
|
17
|
+
color: @grayLight;
|
18
|
+
}
|
19
|
+
.active a {
|
20
|
+
color: @grayDark;
|
21
|
+
}
|
22
|
+
}
|
@@ -0,0 +1,147 @@
|
|
1
|
+
// BUTTON GROUPS
|
2
|
+
// -------------
|
3
|
+
|
4
|
+
|
5
|
+
// Make the div behave like a button
|
6
|
+
.btn-group {
|
7
|
+
position: relative;
|
8
|
+
.clearfix(); // clears the floated buttons
|
9
|
+
.ie7-restore-left-whitespace();
|
10
|
+
}
|
11
|
+
|
12
|
+
// Space out series of button groups
|
13
|
+
.btn-group + .btn-group {
|
14
|
+
margin-left: 5px;
|
15
|
+
}
|
16
|
+
|
17
|
+
// Optional: Group multiple button groups together for a toolbar
|
18
|
+
.btn-toolbar {
|
19
|
+
margin-top: @baseLineHeight / 2;
|
20
|
+
margin-bottom: @baseLineHeight / 2;
|
21
|
+
.btn-group {
|
22
|
+
display: inline-block;
|
23
|
+
.ie7-inline-block();
|
24
|
+
}
|
25
|
+
}
|
26
|
+
|
27
|
+
// Float them, remove border radius, then re-add to first and last elements
|
28
|
+
.btn-group .btn {
|
29
|
+
position: relative;
|
30
|
+
float: left;
|
31
|
+
margin-left: -1px;
|
32
|
+
.border-radius(0);
|
33
|
+
}
|
34
|
+
// Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match
|
35
|
+
.btn-group .btn:first-child {
|
36
|
+
margin-left: 0;
|
37
|
+
-webkit-border-top-left-radius: 4px;
|
38
|
+
-moz-border-radius-topleft: 4px;
|
39
|
+
border-top-left-radius: 4px;
|
40
|
+
-webkit-border-bottom-left-radius: 4px;
|
41
|
+
-moz-border-radius-bottomleft: 4px;
|
42
|
+
border-bottom-left-radius: 4px;
|
43
|
+
}
|
44
|
+
.btn-group .btn:last-child,
|
45
|
+
.btn-group .dropdown-toggle {
|
46
|
+
-webkit-border-top-right-radius: 4px;
|
47
|
+
-moz-border-radius-topright: 4px;
|
48
|
+
border-top-right-radius: 4px;
|
49
|
+
-webkit-border-bottom-right-radius: 4px;
|
50
|
+
-moz-border-radius-bottomright: 4px;
|
51
|
+
border-bottom-right-radius: 4px;
|
52
|
+
}
|
53
|
+
// Reset corners for large buttons
|
54
|
+
.btn-group .btn.large:first-child {
|
55
|
+
margin-left: 0;
|
56
|
+
-webkit-border-top-left-radius: 6px;
|
57
|
+
-moz-border-radius-topleft: 6px;
|
58
|
+
border-top-left-radius: 6px;
|
59
|
+
-webkit-border-bottom-left-radius: 6px;
|
60
|
+
-moz-border-radius-bottomleft: 6px;
|
61
|
+
border-bottom-left-radius: 6px;
|
62
|
+
}
|
63
|
+
.btn-group .btn.large:last-child,
|
64
|
+
.btn-group .large.dropdown-toggle {
|
65
|
+
-webkit-border-top-right-radius: 6px;
|
66
|
+
-moz-border-radius-topright: 6px;
|
67
|
+
border-top-right-radius: 6px;
|
68
|
+
-webkit-border-bottom-right-radius: 6px;
|
69
|
+
-moz-border-radius-bottomright: 6px;
|
70
|
+
border-bottom-right-radius: 6px;
|
71
|
+
}
|
72
|
+
|
73
|
+
// On hover/focus/active, bring the proper btn to front
|
74
|
+
.btn-group .btn:hover,
|
75
|
+
.btn-group .btn:focus,
|
76
|
+
.btn-group .btn:active,
|
77
|
+
.btn-group .btn.active {
|
78
|
+
z-index: 2;
|
79
|
+
}
|
80
|
+
|
81
|
+
// On active and open, don't show outline
|
82
|
+
.btn-group .dropdown-toggle:active,
|
83
|
+
.btn-group.open .dropdown-toggle {
|
84
|
+
outline: 0;
|
85
|
+
}
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
// Split button dropdowns
|
90
|
+
// ----------------------
|
91
|
+
|
92
|
+
// Give the line between buttons some depth
|
93
|
+
.btn-group .dropdown-toggle {
|
94
|
+
padding-left: 8px;
|
95
|
+
padding-right: 8px;
|
96
|
+
@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);
|
97
|
+
.box-shadow(@shadow);
|
98
|
+
*padding-top: 5px;
|
99
|
+
*padding-bottom: 5px;
|
100
|
+
}
|
101
|
+
|
102
|
+
.btn-group.open {
|
103
|
+
// IE7's z-index only goes to the nearest positioned ancestor, which would
|
104
|
+
// make the menu appear below buttons that appeared later on the page
|
105
|
+
*z-index: @zindexDropdown;
|
106
|
+
|
107
|
+
// Reposition menu on open and round all corners
|
108
|
+
.dropdown-menu {
|
109
|
+
display: block;
|
110
|
+
margin-top: 1px;
|
111
|
+
.border-radius(5px);
|
112
|
+
}
|
113
|
+
|
114
|
+
.dropdown-toggle {
|
115
|
+
background-image: none;
|
116
|
+
@shadow: inset 0 1px 6px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
|
117
|
+
.box-shadow(@shadow);
|
118
|
+
}
|
119
|
+
}
|
120
|
+
|
121
|
+
// Reposition the caret
|
122
|
+
.btn .caret {
|
123
|
+
margin-top: 7px;
|
124
|
+
margin-left: 0;
|
125
|
+
}
|
126
|
+
.btn:hover .caret,
|
127
|
+
.open.btn-group .caret {
|
128
|
+
.opacity(100);
|
129
|
+
}
|
130
|
+
|
131
|
+
|
132
|
+
// Account for other colors
|
133
|
+
.btn-primary,
|
134
|
+
.btn-danger,
|
135
|
+
.btn-info,
|
136
|
+
.btn-success {
|
137
|
+
.caret {
|
138
|
+
border-top-color: @white;
|
139
|
+
.opacity(75);
|
140
|
+
}
|
141
|
+
}
|
142
|
+
|
143
|
+
// Small button dropdowns
|
144
|
+
.btn-small .caret {
|
145
|
+
margin-top: 4px;
|
146
|
+
}
|
147
|
+
|
@@ -0,0 +1,165 @@
|
|
1
|
+
// BUTTON STYLES
|
2
|
+
// -------------
|
3
|
+
|
4
|
+
|
5
|
+
// Base styles
|
6
|
+
// --------------------------------------------------
|
7
|
+
|
8
|
+
// Core
|
9
|
+
.btn {
|
10
|
+
display: inline-block;
|
11
|
+
padding: 4px 10px 4px;
|
12
|
+
font-size: @baseFontSize;
|
13
|
+
line-height: @baseLineHeight;
|
14
|
+
color: @grayDark;
|
15
|
+
text-align: center;
|
16
|
+
text-shadow: 0 1px 1px rgba(255,255,255,.75);
|
17
|
+
#gradient > .vertical-three-colors(@white, @white, 25%, darken(@white, 10%)); // Don't use .gradientbar() here since it does a three-color gradient
|
18
|
+
border: 1px solid #ccc;
|
19
|
+
border-bottom-color: #bbb;
|
20
|
+
.border-radius(4px);
|
21
|
+
@shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
|
22
|
+
.box-shadow(@shadow);
|
23
|
+
cursor: pointer;
|
24
|
+
|
25
|
+
// Give IE7 some love
|
26
|
+
.ie7-restore-left-whitespace();
|
27
|
+
}
|
28
|
+
|
29
|
+
// Hover state
|
30
|
+
.btn:hover {
|
31
|
+
color: @grayDark;
|
32
|
+
text-decoration: none;
|
33
|
+
background-color: darken(@white, 10%);
|
34
|
+
background-position: 0 -15px;
|
35
|
+
|
36
|
+
// transition is only when going to hover, otherwise the background
|
37
|
+
// behind the gradient (there for IE<=9 fallback) gets mismatched
|
38
|
+
.transition(background-position .1s linear);
|
39
|
+
}
|
40
|
+
|
41
|
+
// Focus state for keyboard and accessibility
|
42
|
+
.btn:focus {
|
43
|
+
.tab-focus();
|
44
|
+
}
|
45
|
+
|
46
|
+
// Active state
|
47
|
+
.btn.active,
|
48
|
+
.btn:active {
|
49
|
+
background-image: none;
|
50
|
+
@shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
|
51
|
+
.box-shadow(@shadow);
|
52
|
+
background-color: darken(@white, 10%);
|
53
|
+
background-color: darken(@white, 15%) e("\9");
|
54
|
+
color: rgba(0,0,0,.5);
|
55
|
+
outline: 0;
|
56
|
+
}
|
57
|
+
|
58
|
+
// Disabled state
|
59
|
+
.btn.disabled,
|
60
|
+
.btn[disabled] {
|
61
|
+
cursor: default;
|
62
|
+
background-image: none;
|
63
|
+
background-color: darken(@white, 10%);
|
64
|
+
.opacity(65);
|
65
|
+
.box-shadow(none);
|
66
|
+
}
|
67
|
+
|
68
|
+
|
69
|
+
// Button Sizes
|
70
|
+
// --------------------------------------------------
|
71
|
+
|
72
|
+
// Large
|
73
|
+
.btn-large {
|
74
|
+
padding: 9px 14px;
|
75
|
+
font-size: @baseFontSize + 2px;
|
76
|
+
line-height: normal;
|
77
|
+
.border-radius(5px);
|
78
|
+
}
|
79
|
+
.btn-large .icon {
|
80
|
+
margin-top: 1px;
|
81
|
+
}
|
82
|
+
|
83
|
+
// Small
|
84
|
+
.btn-small {
|
85
|
+
padding: 5px 9px;
|
86
|
+
font-size: @baseFontSize - 2px;
|
87
|
+
line-height: @baseLineHeight - 2px;
|
88
|
+
}
|
89
|
+
.btn-small .icon {
|
90
|
+
margin-top: -1px;
|
91
|
+
}
|
92
|
+
|
93
|
+
|
94
|
+
// Alternate buttons
|
95
|
+
// --------------------------------------------------
|
96
|
+
|
97
|
+
// Set text color
|
98
|
+
// -------------------------
|
99
|
+
.btn-primary,
|
100
|
+
.btn-primary:hover,
|
101
|
+
.btn-warning,
|
102
|
+
.btn-warning:hover,
|
103
|
+
.btn-danger,
|
104
|
+
.btn-danger:hover,
|
105
|
+
.btn-success,
|
106
|
+
.btn-success:hover,
|
107
|
+
.btn-info,
|
108
|
+
.btn-info:hover {
|
109
|
+
text-shadow: 0 -1px 0 rgba(0,0,0,.25);
|
110
|
+
color: @white;
|
111
|
+
}
|
112
|
+
// Provide *some* extra contrast for those who can get it
|
113
|
+
.btn-primary.active,
|
114
|
+
.btn-warning.active,
|
115
|
+
.btn-danger.active,
|
116
|
+
.btn-success.active,
|
117
|
+
.btn-info.active {
|
118
|
+
color: rgba(255,255,255,.75);
|
119
|
+
}
|
120
|
+
|
121
|
+
// Set the backgrounds
|
122
|
+
// -------------------------
|
123
|
+
.btn-primary {
|
124
|
+
.buttonBackground(@primaryButtonBackground, spin(@primaryButtonBackground, 20));
|
125
|
+
}
|
126
|
+
// Warning appears are orange
|
127
|
+
.btn-warning {
|
128
|
+
.buttonBackground(lighten(@orange, 15%), @orange);
|
129
|
+
}
|
130
|
+
// Danger and error appear as red
|
131
|
+
.btn-danger {
|
132
|
+
.buttonBackground(#ee5f5b, #bd362f);
|
133
|
+
}
|
134
|
+
// Success appears as green
|
135
|
+
.btn-success {
|
136
|
+
.buttonBackground(#62c462, #51a351);
|
137
|
+
}
|
138
|
+
// Info appears as a neutral blue
|
139
|
+
.btn-info {
|
140
|
+
.buttonBackground(#5bc0de, #2f96b4);
|
141
|
+
}
|
142
|
+
|
143
|
+
|
144
|
+
// Cross-browser Jank
|
145
|
+
// --------------------------------------------------
|
146
|
+
|
147
|
+
button.btn,
|
148
|
+
input[type="submit"].btn {
|
149
|
+
&::-moz-focus-inner {
|
150
|
+
padding: 0;
|
151
|
+
border: 0;
|
152
|
+
}
|
153
|
+
|
154
|
+
// IE7 has some default padding on button controls
|
155
|
+
*padding-top: 2px;
|
156
|
+
*padding-bottom: 2px;
|
157
|
+
&.large {
|
158
|
+
*padding-top: 7px;
|
159
|
+
*padding-bottom: 7px;
|
160
|
+
}
|
161
|
+
&.small {
|
162
|
+
*padding-top: 3px;
|
163
|
+
*padding-bottom: 3px;
|
164
|
+
}
|
165
|
+
}
|