cmaitchison-bootstrap-rails 2.0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/README.md +97 -0
- data/Rakefile +45 -0
- data/bootstrap-rails.gemspec +23 -0
- data/lib/bootstrap-rails.rb +13 -0
- data/lib/bootstrap-rails/engine.rb +6 -0
- data/lib/bootstrap-rails/ie_hex_str.rb +16 -0
- data/lib/bootstrap-rails/railtie.rb +5 -0
- data/lib/bootstrap-rails/version.rb +5 -0
- data/test/ie_hex_str_test.rb +26 -0
- data/test/test_helper.rb +2 -0
- 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 +94 -0
- data/vendor/assets/javascripts/bootstrap-button.js +100 -0
- data/vendor/assets/javascripts/bootstrap-carousel.js +157 -0
- data/vendor/assets/javascripts/bootstrap-collapse.js +136 -0
- data/vendor/assets/javascripts/bootstrap-dropdown.js +92 -0
- data/vendor/assets/javascripts/bootstrap-modal.js +210 -0
- data/vendor/assets/javascripts/bootstrap-popover.js +95 -0
- data/vendor/assets/javascripts/bootstrap-scrollspy.js +125 -0
- 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 +12 -0
- data/vendor/assets/stylesheets/accordion.scss +28 -0
- data/vendor/assets/stylesheets/alerts.scss +70 -0
- data/vendor/assets/stylesheets/bootstrap.scss +62 -0
- data/vendor/assets/stylesheets/breadcrumbs.scss +22 -0
- data/vendor/assets/stylesheets/button-groups.scss +148 -0
- data/vendor/assets/stylesheets/buttons.scss +183 -0
- data/vendor/assets/stylesheets/carousel.scss +121 -0
- data/vendor/assets/stylesheets/close.scss +18 -0
- data/vendor/assets/stylesheets/code.scss +57 -0
- data/vendor/assets/stylesheets/component-animations.scss +18 -0
- data/vendor/assets/stylesheets/dropdowns.scss +130 -0
- data/vendor/assets/stylesheets/forms.scss +523 -0
- data/vendor/assets/stylesheets/grid.scss +8 -0
- data/vendor/assets/stylesheets/hero-unit.scss +20 -0
- data/vendor/assets/stylesheets/labels.scss +32 -0
- data/vendor/assets/stylesheets/layouts.scss +17 -0
- data/vendor/assets/stylesheets/mixins.scss +560 -0
- data/vendor/assets/stylesheets/modals.scss +83 -0
- data/vendor/assets/stylesheets/navbar.scss +299 -0
- data/vendor/assets/stylesheets/navs.scss +353 -0
- data/vendor/assets/stylesheets/pager.scss +30 -0
- data/vendor/assets/stylesheets/pagination.scss +55 -0
- data/vendor/assets/stylesheets/popovers.scss +49 -0
- data/vendor/assets/stylesheets/progress-bars.scss +95 -0
- data/vendor/assets/stylesheets/reset.scss +126 -0
- data/vendor/assets/stylesheets/responsive.scss +327 -0
- data/vendor/assets/stylesheets/scaffolding.scss +29 -0
- data/vendor/assets/stylesheets/sprites.scss +158 -0
- data/vendor/assets/stylesheets/tables.scss +141 -0
- data/vendor/assets/stylesheets/thumbnails.scss +35 -0
- data/vendor/assets/stylesheets/tooltip.scss +35 -0
- data/vendor/assets/stylesheets/type.scss +218 -0
- data/vendor/assets/stylesheets/utilities.scss +23 -0
- data/vendor/assets/stylesheets/variables.scss +107 -0
- data/vendor/assets/stylesheets/wells.scss +17 -0
- metadata +154 -0
@@ -0,0 +1,22 @@
|
|
1
|
+
// BREADCRUMBS
|
2
|
+
// -----------
|
3
|
+
|
4
|
+
.breadcrumb {
|
5
|
+
padding: 7px 14px;
|
6
|
+
margin: 0 0 $baseLineHeight;
|
7
|
+
@include gradient-vertical($white, #f5f5f5);
|
8
|
+
border: 1px solid #ddd;
|
9
|
+
@include border-radius(3px);
|
10
|
+
@include box-shadow(inset 0 1px 0 $white);
|
11
|
+
li {
|
12
|
+
display: inline-block;
|
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,148 @@
|
|
1
|
+
// BUTTON GROUPS
|
2
|
+
// -------------
|
3
|
+
|
4
|
+
|
5
|
+
// Make the div behave like a button
|
6
|
+
.btn-group {
|
7
|
+
position: relative;
|
8
|
+
@include clearfix(); // clears the floated buttons
|
9
|
+
@include 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
|
+
@include 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
|
+
@include 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
|
+
@include 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
|
+
@include 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
|
+
@include 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
|
+
@include opacity(100);
|
129
|
+
}
|
130
|
+
|
131
|
+
|
132
|
+
// Account for other colors
|
133
|
+
.btn-primary,
|
134
|
+
.btn-danger,
|
135
|
+
.btn-info,
|
136
|
+
.btn-success,
|
137
|
+
.btn-inverse {
|
138
|
+
.caret {
|
139
|
+
border-top-color: $white;
|
140
|
+
@include opacity(75);
|
141
|
+
}
|
142
|
+
}
|
143
|
+
|
144
|
+
// Small button dropdowns
|
145
|
+
.btn-small .caret {
|
146
|
+
margin-top: 4px;
|
147
|
+
}
|
148
|
+
|
@@ -0,0 +1,183 @@
|
|
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
|
+
margin-bottom: 0; // For input.btn
|
13
|
+
font-size: $baseFontSize;
|
14
|
+
line-height: $baseLineHeight;
|
15
|
+
color: $grayDark;
|
16
|
+
text-align: center;
|
17
|
+
text-shadow: 0 1px 1px rgba(255,255,255,.75);
|
18
|
+
vertical-align: middle;
|
19
|
+
@include button-background($white, darken($white, 10%));
|
20
|
+
border: 1px solid #ccc;
|
21
|
+
border-bottom-color: #bbb;
|
22
|
+
@include border-radius(4px);
|
23
|
+
$shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
|
24
|
+
@include box-shadow($shadow);
|
25
|
+
cursor: pointer;
|
26
|
+
|
27
|
+
// Give IE7 some love
|
28
|
+
@include reset-filter();
|
29
|
+
@include ie7-restore-left-whitespace();
|
30
|
+
}
|
31
|
+
|
32
|
+
// Hover state
|
33
|
+
.btn:hover {
|
34
|
+
color: $grayDark;
|
35
|
+
text-decoration: none;
|
36
|
+
background-color: darken($white, 10%);
|
37
|
+
background-position: 0 -15px;
|
38
|
+
|
39
|
+
// transition is only when going to hover, otherwise the background
|
40
|
+
// behind the gradient (there for IE<=9 fallback) gets mismatched
|
41
|
+
@include transition(background-position .1s linear);
|
42
|
+
}
|
43
|
+
|
44
|
+
// Focus state for keyboard and accessibility
|
45
|
+
.btn:focus {
|
46
|
+
@include tab-focus();
|
47
|
+
}
|
48
|
+
|
49
|
+
// Active state
|
50
|
+
.btn.active,
|
51
|
+
.btn:active {
|
52
|
+
background-image: none;
|
53
|
+
$shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
|
54
|
+
@include box-shadow($shadow);
|
55
|
+
background-color: darken($white, 10%);
|
56
|
+
background-color: darken($white, 15%) e("\9");
|
57
|
+
outline: 0;
|
58
|
+
}
|
59
|
+
|
60
|
+
// Disabled state
|
61
|
+
.btn.disabled,
|
62
|
+
.btn[disabled] {
|
63
|
+
cursor: default;
|
64
|
+
background-image: none;
|
65
|
+
background-color: darken($white, 10%);
|
66
|
+
@include opacity(65);
|
67
|
+
@include box-shadow(none);
|
68
|
+
}
|
69
|
+
|
70
|
+
|
71
|
+
// Button Sizes
|
72
|
+
// --------------------------------------------------
|
73
|
+
|
74
|
+
// Large
|
75
|
+
.btn-large {
|
76
|
+
padding: 9px 14px;
|
77
|
+
font-size: $baseFontSize + 2px;
|
78
|
+
line-height: normal;
|
79
|
+
@include border-radius(5px);
|
80
|
+
}
|
81
|
+
.btn-large [class^="icon-"] {
|
82
|
+
margin-top: 1px;
|
83
|
+
}
|
84
|
+
|
85
|
+
// Small
|
86
|
+
.btn-small {
|
87
|
+
padding: 5px 9px;
|
88
|
+
font-size: $baseFontSize - 2px;
|
89
|
+
line-height: $baseLineHeight - 2px;
|
90
|
+
}
|
91
|
+
.btn-small [class^="icon-"] {
|
92
|
+
margin-top: -1px;
|
93
|
+
}
|
94
|
+
|
95
|
+
// Mini
|
96
|
+
.btn-mini {
|
97
|
+
padding: 2px 6px;
|
98
|
+
font-size: $baseFontSize - 2px;
|
99
|
+
line-height: $baseLineHeight - 4px;
|
100
|
+
}
|
101
|
+
|
102
|
+
|
103
|
+
// Alternate buttons
|
104
|
+
// --------------------------------------------------
|
105
|
+
|
106
|
+
// Set text color
|
107
|
+
// -------------------------
|
108
|
+
.btn-primary,
|
109
|
+
.btn-primary:hover,
|
110
|
+
.btn-warning,
|
111
|
+
.btn-warning:hover,
|
112
|
+
.btn-danger,
|
113
|
+
.btn-danger:hover,
|
114
|
+
.btn-success,
|
115
|
+
.btn-success:hover,
|
116
|
+
.btn-info,
|
117
|
+
.btn-info:hover,
|
118
|
+
.btn-inverse,
|
119
|
+
.btn-inverse:hover {
|
120
|
+
text-shadow: 0 -1px 0 rgba(0,0,0,.25);
|
121
|
+
color: $white;
|
122
|
+
}
|
123
|
+
// Provide *some* extra contrast for those who can get it
|
124
|
+
.btn-primary.active,
|
125
|
+
.btn-warning.active,
|
126
|
+
.btn-danger.active,
|
127
|
+
.btn-success.active,
|
128
|
+
.btn-info.active,
|
129
|
+
.btn-dark.active {
|
130
|
+
color: rgba(255,255,255,.75);
|
131
|
+
}
|
132
|
+
|
133
|
+
// Set the backgrounds
|
134
|
+
// -------------------------
|
135
|
+
.btn-primary {
|
136
|
+
@include button-background($primaryButtonBackground, adjust-hue($primaryButtonBackground, 20));
|
137
|
+
}
|
138
|
+
// Warning appears are orange
|
139
|
+
.btn-warning {
|
140
|
+
@include button-background(lighten($orange, 15%), $orange);
|
141
|
+
}
|
142
|
+
// Danger and error appear as red
|
143
|
+
.btn-danger {
|
144
|
+
@include button-background(#ee5f5b, #bd362f);
|
145
|
+
}
|
146
|
+
// Success appears as green
|
147
|
+
.btn-success {
|
148
|
+
@include button-background(#62c462, #51a351);
|
149
|
+
}
|
150
|
+
// Info appears as a neutral blue
|
151
|
+
.btn-info {
|
152
|
+
@include button-background(#5bc0de, #2f96b4);
|
153
|
+
}
|
154
|
+
// Inverse appears as dark gray
|
155
|
+
.btn-inverse {
|
156
|
+
@include button-background(#454545, #262626);
|
157
|
+
}
|
158
|
+
|
159
|
+
|
160
|
+
// Cross-browser Jank
|
161
|
+
// --------------------------------------------------
|
162
|
+
|
163
|
+
button.btn,
|
164
|
+
input[type="submit"].btn {
|
165
|
+
|
166
|
+
// Firefox 3.6 only I believe
|
167
|
+
&::-moz-focus-inner {
|
168
|
+
padding: 0;
|
169
|
+
border: 0;
|
170
|
+
}
|
171
|
+
|
172
|
+
// IE7 has some default padding on button controls
|
173
|
+
*padding-top: 2px;
|
174
|
+
*padding-bottom: 2px;
|
175
|
+
&.large {
|
176
|
+
*padding-top: 7px;
|
177
|
+
*padding-bottom: 7px;
|
178
|
+
}
|
179
|
+
&.small {
|
180
|
+
*padding-top: 3px;
|
181
|
+
*padding-bottom: 3px;
|
182
|
+
}
|
183
|
+
}
|
@@ -0,0 +1,121 @@
|
|
1
|
+
// CAROUSEL
|
2
|
+
// --------
|
3
|
+
|
4
|
+
.carousel {
|
5
|
+
position: relative;
|
6
|
+
margin-bottom: $baseLineHeight;
|
7
|
+
line-height: 1;
|
8
|
+
}
|
9
|
+
|
10
|
+
.carousel-inner {
|
11
|
+
overflow: hidden;
|
12
|
+
width: 100%;
|
13
|
+
position: relative;
|
14
|
+
}
|
15
|
+
|
16
|
+
.carousel {
|
17
|
+
|
18
|
+
.item {
|
19
|
+
display: none;
|
20
|
+
position: relative;
|
21
|
+
@include transition(.6s ease-in-out left);
|
22
|
+
}
|
23
|
+
|
24
|
+
// Account for jankitude on images
|
25
|
+
.item > img {
|
26
|
+
display: block;
|
27
|
+
line-height: 1;
|
28
|
+
}
|
29
|
+
|
30
|
+
.active,
|
31
|
+
.next,
|
32
|
+
.prev { display: block; }
|
33
|
+
|
34
|
+
.active {
|
35
|
+
left: 0;
|
36
|
+
}
|
37
|
+
|
38
|
+
.next,
|
39
|
+
.prev {
|
40
|
+
position: absolute;
|
41
|
+
top: 0;
|
42
|
+
width: 100%;
|
43
|
+
}
|
44
|
+
|
45
|
+
.next {
|
46
|
+
left: 100%;
|
47
|
+
}
|
48
|
+
.prev {
|
49
|
+
left: -100%;
|
50
|
+
}
|
51
|
+
.next.left,
|
52
|
+
.prev.right {
|
53
|
+
left: 0;
|
54
|
+
}
|
55
|
+
|
56
|
+
.active.left {
|
57
|
+
left: -100%;
|
58
|
+
}
|
59
|
+
.active.right {
|
60
|
+
left: 100%;
|
61
|
+
}
|
62
|
+
|
63
|
+
}
|
64
|
+
|
65
|
+
// Left/right controls for nav
|
66
|
+
// ---------------------------
|
67
|
+
|
68
|
+
.carousel-control {
|
69
|
+
position: absolute;
|
70
|
+
top: 40%;
|
71
|
+
left: 15px;
|
72
|
+
width: 40px;
|
73
|
+
height: 40px;
|
74
|
+
margin-top: -20px;
|
75
|
+
font-size: 60px;
|
76
|
+
font-weight: 100;
|
77
|
+
line-height: 30px;
|
78
|
+
color: $white;
|
79
|
+
text-align: center;
|
80
|
+
background: $grayDarker;
|
81
|
+
border: 3px solid $white;
|
82
|
+
@include border-radius(23px);
|
83
|
+
@include opacity(50);
|
84
|
+
|
85
|
+
// we can't have this transition here
|
86
|
+
// because webkit cancels the carousel
|
87
|
+
// animation if you trip this while
|
88
|
+
// in the middle of another animation
|
89
|
+
// ;_;
|
90
|
+
// .transition(opacity .2s linear);
|
91
|
+
|
92
|
+
// Reposition the right one
|
93
|
+
&.right {
|
94
|
+
left: auto;
|
95
|
+
right: 15px;
|
96
|
+
}
|
97
|
+
|
98
|
+
// Hover state
|
99
|
+
&:hover {
|
100
|
+
color: $white;
|
101
|
+
text-decoration: none;
|
102
|
+
@include opacity(90);
|
103
|
+
}
|
104
|
+
}
|
105
|
+
|
106
|
+
// Caption for text below images
|
107
|
+
// -----------------------------
|
108
|
+
|
109
|
+
.carousel-caption {
|
110
|
+
position: absolute;
|
111
|
+
left: 0;
|
112
|
+
right: 0;
|
113
|
+
bottom: 0;
|
114
|
+
padding: 10px 15px 5px;
|
115
|
+
background: $grayDark;
|
116
|
+
background: rgba(0,0,0,.75);
|
117
|
+
}
|
118
|
+
.carousel-caption h4,
|
119
|
+
.carousel-caption p {
|
120
|
+
color: $white;
|
121
|
+
}
|