audit_rails 2.0.4 → 2.0.5

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.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -1
  3. data/app/assets/stylesheets/audit_rails/application.css +3 -4
  4. data/app/assets/stylesheets/audit_rails/audit_rails.css +78 -0
  5. data/app/assets/stylesheets/audit_rails/bootstrap_override.css +58 -0
  6. data/app/assets/stylesheets/audit_rails/twitter/_alerts.scss +67 -0
  7. data/app/assets/stylesheets/audit_rails/twitter/_badges.scss +51 -0
  8. data/app/assets/stylesheets/audit_rails/twitter/_breadcrumbs.scss +23 -0
  9. data/app/assets/stylesheets/audit_rails/twitter/_button-groups.scss +253 -0
  10. data/app/assets/stylesheets/audit_rails/twitter/_buttons.scss +158 -0
  11. data/app/assets/stylesheets/audit_rails/twitter/_carousel.scss +231 -0
  12. data/app/assets/stylesheets/audit_rails/twitter/_close.scss +35 -0
  13. data/app/assets/stylesheets/audit_rails/twitter/_code.scss +53 -0
  14. data/app/assets/stylesheets/audit_rails/twitter/_component-animations.scss +29 -0
  15. data/app/assets/stylesheets/audit_rails/twitter/_dropdowns.scss +193 -0
  16. data/app/assets/stylesheets/audit_rails/twitter/_forms.scss +363 -0
  17. data/app/assets/stylesheets/audit_rails/twitter/_glyphicons.scss +236 -0
  18. data/app/assets/stylesheets/audit_rails/twitter/_grid.scss +93 -0
  19. data/app/assets/stylesheets/audit_rails/twitter/_input-groups.scss +136 -0
  20. data/app/assets/stylesheets/audit_rails/twitter/_jumbotron.scss +40 -0
  21. data/app/assets/stylesheets/audit_rails/twitter/_labels.scss +58 -0
  22. data/app/assets/stylesheets/audit_rails/twitter/_list-group.scss +88 -0
  23. data/app/assets/stylesheets/audit_rails/twitter/_media.scss +56 -0
  24. data/app/assets/stylesheets/audit_rails/twitter/_mixins.scss +861 -0
  25. data/app/assets/stylesheets/audit_rails/twitter/_modals.scss +132 -0
  26. data/app/assets/stylesheets/audit_rails/twitter/_navbar.scss +628 -0
  27. data/app/assets/stylesheets/audit_rails/twitter/_navs.scss +262 -0
  28. data/app/assets/stylesheets/audit_rails/twitter/_normalize.scss +406 -0
  29. data/app/assets/stylesheets/audit_rails/twitter/_pager.scss +55 -0
  30. data/app/assets/stylesheets/audit_rails/twitter/_pagination.scss +85 -0
  31. data/app/assets/stylesheets/audit_rails/twitter/_panels.scss +172 -0
  32. data/app/assets/stylesheets/audit_rails/twitter/_popovers.scss +133 -0
  33. data/app/assets/stylesheets/audit_rails/twitter/_print.scss +105 -0
  34. data/app/assets/stylesheets/audit_rails/twitter/_progress-bars.scss +92 -0
  35. data/app/assets/stylesheets/audit_rails/twitter/_responsive-utilities.scss +198 -0
  36. data/app/assets/stylesheets/audit_rails/twitter/_scaffolding.scss +119 -0
  37. data/app/assets/stylesheets/audit_rails/twitter/_tables.scss +244 -0
  38. data/app/assets/stylesheets/audit_rails/twitter/_theme.scss +247 -0
  39. data/app/assets/stylesheets/audit_rails/twitter/_thumbnails.scss +32 -0
  40. data/app/assets/stylesheets/audit_rails/twitter/_tooltip.scss +95 -0
  41. data/app/assets/stylesheets/audit_rails/twitter/_type.scss +279 -0
  42. data/app/assets/stylesheets/audit_rails/twitter/_utilities.scss +56 -0
  43. data/app/assets/stylesheets/audit_rails/twitter/_variables.scss +637 -0
  44. data/app/assets/stylesheets/audit_rails/twitter/_wells.scss +29 -0
  45. data/app/assets/stylesheets/audit_rails/twitter/bootstrap.scss +49 -0
  46. data/app/views/audit_rails/audits/_form_elements.html.erb +8 -2
  47. data/app/views/layouts/audit_rails/application.html.erb +33 -24
  48. data/lib/audit_rails/version.rb +1 -1
  49. metadata +47 -9
  50. data/app/assets/stylesheets/audit_rails/bootstrap-theme.css +0 -384
  51. data/app/assets/stylesheets/audit_rails/bootstrap.css +0 -6805
  52. data/app/assets/stylesheets/audit_rails/theme.css +0 -14
@@ -0,0 +1,40 @@
1
+ //
2
+ // Jumbotron
3
+ // --------------------------------------------------
4
+
5
+
6
+ .jumbotron {
7
+ padding: $jumbotron-padding;
8
+ margin-bottom: $jumbotron-padding;
9
+ font-size: $jumbotron-font-size;
10
+ font-weight: 200;
11
+ line-height: ($line-height-base * 1.5);
12
+ color: $jumbotron-color;
13
+ background-color: $jumbotron-bg;
14
+
15
+ h1 {
16
+ line-height: 1;
17
+ color: $jumbotron-heading-color;
18
+ }
19
+ p {
20
+ line-height: 1.4;
21
+ }
22
+
23
+ .container & {
24
+ border-radius: $border-radius-large; // Only round corners at higher resolutions if contained in a container
25
+ }
26
+
27
+ @media screen and (min-width: $screen-sm-min) {
28
+ padding-top: ($jumbotron-padding * 1.6);
29
+ padding-bottom: ($jumbotron-padding * 1.6);
30
+
31
+ .container & {
32
+ padding-left: ($jumbotron-padding * 2);
33
+ padding-right: ($jumbotron-padding * 2);
34
+ }
35
+
36
+ h1 {
37
+ font-size: ($font-size-base * 4.5);
38
+ }
39
+ }
40
+ }
@@ -0,0 +1,58 @@
1
+ //
2
+ // Labels
3
+ // --------------------------------------------------
4
+
5
+ .label {
6
+ display: inline;
7
+ padding: .2em .6em .3em;
8
+ font-size: 75%;
9
+ font-weight: bold;
10
+ line-height: 1;
11
+ color: $label-color;
12
+ text-align: center;
13
+ white-space: nowrap;
14
+ vertical-align: baseline;
15
+ border-radius: .25em;
16
+
17
+ // Add hover effects, but only for links
18
+ &[href] {
19
+ &:hover,
20
+ &:focus {
21
+ color: $label-link-hover-color;
22
+ text-decoration: none;
23
+ cursor: pointer;
24
+ }
25
+ }
26
+
27
+ // Empty labels collapse automatically (not available in IE8)
28
+ &:empty {
29
+ display: none;
30
+ }
31
+ }
32
+
33
+ // Colors
34
+ // Contextual variations (linked labels get darker on :hover)
35
+
36
+ .label-default {
37
+ @include label-variant($label-default-bg);
38
+ }
39
+
40
+ .label-primary {
41
+ @include label-variant($label-primary-bg);
42
+ }
43
+
44
+ .label-success {
45
+ @include label-variant($label-success-bg);
46
+ }
47
+
48
+ .label-info {
49
+ @include label-variant($label-info-bg);
50
+ }
51
+
52
+ .label-warning {
53
+ @include label-variant($label-warning-bg);
54
+ }
55
+
56
+ .label-danger {
57
+ @include label-variant($label-danger-bg);
58
+ }
@@ -0,0 +1,88 @@
1
+ //
2
+ // List groups
3
+ // --------------------------------------------------
4
+
5
+ // Base class
6
+ //
7
+ // Easily usable on <ul>, <ol>, or <div>.
8
+ .list-group {
9
+ // No need to set list-style: none; since .list-group-item is block level
10
+ margin-bottom: 20px;
11
+ padding-left: 0; // reset padding because ul and ol
12
+ }
13
+
14
+ // Individual list items
15
+ // -------------------------
16
+
17
+ .list-group-item {
18
+ position: relative;
19
+ display: block;
20
+ padding: 10px 15px;
21
+ // Place the border on the list items and negative margin up for better styling
22
+ margin-bottom: -1px;
23
+ background-color: $list-group-bg;
24
+ border: 1px solid $list-group-border;
25
+
26
+ // Round the first and last items
27
+ &:first-child {
28
+ @include border-top-radius($list-group-border-radius);
29
+ }
30
+ &:last-child {
31
+ margin-bottom: 0;
32
+ @include border-bottom-radius($list-group-border-radius);
33
+ }
34
+
35
+ // Align badges within list items
36
+ > .badge {
37
+ float: right;
38
+ }
39
+ > .badge + .badge {
40
+ margin-right: 5px;
41
+ }
42
+ }
43
+
44
+ // Linked list items
45
+ a.list-group-item {
46
+ color: $list-group-link-color;
47
+
48
+ .list-group-item-heading {
49
+ color: $list-group-link-heading-color;
50
+ }
51
+
52
+ // Hover state
53
+ &:hover,
54
+ &:focus {
55
+ text-decoration: none;
56
+ background-color: $list-group-hover-bg;
57
+ }
58
+
59
+ // Active class on item itself, not parent
60
+ &.active,
61
+ &.active:hover,
62
+ &.active:focus {
63
+ z-index: 2; // Place active items above their siblings for proper border styling
64
+ color: $list-group-active-color;
65
+ background-color: $list-group-active-bg;
66
+ border-color: $list-group-active-border;
67
+
68
+ // Force color to inherit for custom content
69
+ .list-group-item-heading {
70
+ color: inherit;
71
+ }
72
+ .list-group-item-text {
73
+ color: lighten($list-group-active-bg, 40%);
74
+ }
75
+ }
76
+ }
77
+
78
+ // Custom content options
79
+ // -------------------------
80
+
81
+ .list-group-item-heading {
82
+ margin-top: 0;
83
+ margin-bottom: 5px;
84
+ }
85
+ .list-group-item-text {
86
+ margin-bottom: 0;
87
+ line-height: 1.3;
88
+ }
@@ -0,0 +1,56 @@
1
+ // Media objects
2
+ // Source: http://stubbornella.org/content/?p=497
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Common styles
7
+ // -------------------------
8
+
9
+ // Clear the floats
10
+ .media,
11
+ .media-body {
12
+ overflow: hidden;
13
+ zoom: 1;
14
+ }
15
+
16
+ // Proper spacing between instances of .media
17
+ .media,
18
+ .media .media {
19
+ margin-top: 15px;
20
+ }
21
+ .media:first-child {
22
+ margin-top: 0;
23
+ }
24
+
25
+ // For images and videos, set to block
26
+ .media-object {
27
+ display: block;
28
+ }
29
+
30
+ // Reset margins on headings for tighter default spacing
31
+ .media-heading {
32
+ margin: 0 0 5px;
33
+ }
34
+
35
+
36
+ // Media image alignment
37
+ // -------------------------
38
+
39
+ .media {
40
+ > .pull-left {
41
+ margin-right: 10px;
42
+ }
43
+ > .pull-right {
44
+ margin-left: 10px;
45
+ }
46
+ }
47
+
48
+
49
+ // Media list variation
50
+ // -------------------------
51
+
52
+ // Undo default ul/ol styles
53
+ .media-list {
54
+ padding-left: 0;
55
+ list-style: none;
56
+ }
@@ -0,0 +1,861 @@
1
+ //
2
+ // Mixins
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Utilities
7
+ // -------------------------
8
+
9
+ // Clearfix
10
+ // Source: http://nicolasgallagher.com/micro-clearfix-hack/
11
+ //
12
+ // For modern browsers
13
+ // 1. The space content is one way to avoid an Opera bug when the
14
+ // contenteditable attribute is included anywhere else in the document.
15
+ // Otherwise it causes space to appear at the top and bottom of elements
16
+ // that are clearfixed.
17
+ // 2. The use of `table` rather than `block` is only necessary if using
18
+ // `:before` to contain the top-margins of child elements.
19
+ @mixin clearfix() {
20
+ &:before,
21
+ &:after {
22
+ content: " "; /* 1 */
23
+ display: table; /* 2 */
24
+ }
25
+ &:after {
26
+ clear: both;
27
+ }
28
+ }
29
+
30
+ // WebKit-style focus
31
+ @mixin tab-focus() {
32
+ // Default
33
+ outline: thin dotted #333;
34
+ // WebKit
35
+ outline: 5px auto -webkit-focus-ring-color;
36
+ outline-offset: -2px;
37
+ }
38
+
39
+ // Center-align a block level element
40
+ @mixin center-block() {
41
+ display: block;
42
+ margin-left: auto;
43
+ margin-right: auto;
44
+ }
45
+
46
+ // Sizing shortcuts
47
+ @mixin size($width, $height) {
48
+ width: $width;
49
+ height: $height;
50
+ }
51
+ @mixin square($size) {
52
+ @include size($size, $size);
53
+ }
54
+
55
+ // Placeholder text
56
+ @mixin placeholder($color: $input-color-placeholder) {
57
+ &:-moz-placeholder { color: $color; } // Firefox 4-18
58
+ &::-moz-placeholder { color: $color; } // Firefox 19+
59
+ &:-ms-input-placeholder { color: $color; } // Internet Explorer 10+
60
+ &::-webkit-input-placeholder { color: $color; } // Safari and Chrome
61
+ }
62
+
63
+ // Text overflow
64
+ // Requires inline-block or block for proper styling
65
+ @mixin text-overflow() {
66
+ overflow: hidden;
67
+ text-overflow: ellipsis;
68
+ white-space: nowrap;
69
+ }
70
+
71
+ // CSS image replacement
72
+ //
73
+ // Heads up! v3 launched with with only `.hide-text()`, but per our pattern for
74
+ // mixins being reused as classes with the same name, this doesn't hold up. As
75
+ // of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`. Note
76
+ // that we cannot chain the mixins together in Less, so they are repeated.
77
+ //
78
+ // Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757
79
+
80
+ // Deprecated as of v3.0.1 (will be removed in v4)
81
+ @mixin hide-text() {
82
+ font: #{0/0} a;
83
+ color: transparent;
84
+ text-shadow: none;
85
+ background-color: transparent;
86
+ border: 0;
87
+ }
88
+ // New mixin to use as of v3.0.1
89
+ @mixin text-hide() {
90
+ font: #{0/0} a;
91
+ color: transparent;
92
+ text-shadow: none;
93
+ background-color: transparent;
94
+ border: 0;
95
+ }
96
+
97
+
98
+
99
+ // CSS3 PROPERTIES
100
+ // --------------------------------------------------
101
+
102
+ // Single side border-radius
103
+ @mixin border-top-radius($radius) {
104
+ border-top-right-radius: $radius;
105
+ border-top-left-radius: $radius;
106
+ }
107
+ @mixin border-right-radius($radius) {
108
+ border-bottom-right-radius: $radius;
109
+ border-top-right-radius: $radius;
110
+ }
111
+ @mixin border-bottom-radius($radius) {
112
+ border-bottom-right-radius: $radius;
113
+ border-bottom-left-radius: $radius;
114
+ }
115
+ @mixin border-left-radius($radius) {
116
+ border-bottom-left-radius: $radius;
117
+ border-top-left-radius: $radius;
118
+ }
119
+
120
+ // Drop shadows
121
+ @mixin box-shadow($shadow...) {
122
+ -webkit-box-shadow: $shadow; // iOS <4.3 & Android <4.1
123
+ box-shadow: $shadow;
124
+ }
125
+
126
+ // Transitions
127
+ @mixin transition($transition...) {
128
+ -webkit-transition: $transition;
129
+ transition: $transition;
130
+ }
131
+ @mixin transition-property($transition-property) {
132
+ -webkit-transition-property: $transition-property;
133
+ transition-property: $transition-property;
134
+ }
135
+ @mixin transition-delay($transition-delay) {
136
+ -webkit-transition-delay: $transition-delay;
137
+ transition-delay: $transition-delay;
138
+ }
139
+ @mixin transition-duration($transition-duration) {
140
+ -webkit-transition-duration: $transition-duration;
141
+ transition-duration: $transition-duration;
142
+ }
143
+ @mixin transition-transform($transition...) {
144
+ -webkit-transition: -webkit-transform $transition;
145
+ -moz-transition: -moz-transform $transition;
146
+ -o-transition: -o-transform $transition;
147
+ transition: transform $transition;
148
+ }
149
+
150
+ // Transformations
151
+ @mixin rotate($degrees) {
152
+ -webkit-transform: rotate($degrees);
153
+ -ms-transform: rotate($degrees); // IE9+
154
+ transform: rotate($degrees);
155
+ }
156
+ @mixin scale($ratio) {
157
+ -webkit-transform: scale($ratio);
158
+ -ms-transform: scale($ratio); // IE9+
159
+ transform: scale($ratio);
160
+ }
161
+ @mixin translate($x, $y) {
162
+ -webkit-transform: translate($x, $y);
163
+ -ms-transform: translate($x, $y); // IE9+
164
+ transform: translate($x, $y);
165
+ }
166
+ @mixin skew($x, $y) {
167
+ -webkit-transform: skew($x, $y);
168
+ -ms-transform: skewX($x) skewY($y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+
169
+ transform: skew($x, $y);
170
+ }
171
+ @mixin translate3d($x, $y, $z) {
172
+ -webkit-transform: translate3d($x, $y, $z);
173
+ transform: translate3d($x, $y, $z);
174
+ }
175
+
176
+ @mixin rotateX($degrees) {
177
+ -webkit-transform: rotateX($degrees);
178
+ -ms-transform: rotateX($degrees); // IE9+
179
+ transform: rotateX($degrees);
180
+ }
181
+ @mixin rotateY($degrees) {
182
+ -webkit-transform: rotateY($degrees);
183
+ -ms-transform: rotateY($degrees); // IE9+
184
+ transform: rotateY($degrees);
185
+ }
186
+ @mixin perspective($perspective) {
187
+ -webkit-perspective: $perspective;
188
+ -moz-perspective: $perspective;
189
+ perspective: $perspective;
190
+ }
191
+ @mixin perspective-origin($perspective) {
192
+ -webkit-perspective-origin: $perspective;
193
+ -moz-perspective-origin: $perspective;
194
+ perspective-origin: $perspective;
195
+ }
196
+ @mixin transform-origin($origin) {
197
+ -webkit-transform-origin: $origin;
198
+ -moz-transform-origin: $origin;
199
+ transform-origin: $origin;
200
+ }
201
+
202
+ // Animations
203
+ @mixin animation($animation) {
204
+ -webkit-animation: $animation;
205
+ animation: $animation;
206
+ }
207
+
208
+ // Backface visibility
209
+ // Prevent browsers from flickering when using CSS 3D transforms.
210
+ // Default value is `visible`, but can be changed to `hidden`
211
+ @mixin backface-visibility($visibility){
212
+ -webkit-backface-visibility: $visibility;
213
+ -moz-backface-visibility: $visibility;
214
+ backface-visibility: $visibility;
215
+ }
216
+
217
+ // Box sizing
218
+ @mixin box-sizing($boxmodel) {
219
+ -webkit-box-sizing: $boxmodel;
220
+ -moz-box-sizing: $boxmodel;
221
+ box-sizing: $boxmodel;
222
+ }
223
+
224
+ // User select
225
+ // For selecting text on the page
226
+ @mixin user-select($select) {
227
+ -webkit-user-select: $select;
228
+ -moz-user-select: $select;
229
+ -ms-user-select: $select; // IE10+
230
+ -o-user-select: $select;
231
+ user-select: $select;
232
+ }
233
+
234
+ // Resize anything
235
+ @mixin resizable($direction) {
236
+ resize: $direction; // Options: horizontal, vertical, both
237
+ overflow: auto; // Safari fix
238
+ }
239
+
240
+ // CSS3 Content Columns
241
+ @mixin content-columns($column-count, $column-gap: $grid-gutter-width) {
242
+ -webkit-column-count: $column-count;
243
+ -moz-column-count: $column-count;
244
+ column-count: $column-count;
245
+ -webkit-column-gap: $column-gap;
246
+ -moz-column-gap: $column-gap;
247
+ column-gap: $column-gap;
248
+ }
249
+
250
+ // Optional hyphenation
251
+ @mixin hyphens($mode: auto) {
252
+ word-wrap: break-word;
253
+ -webkit-hyphens: $mode;
254
+ -moz-hyphens: $mode;
255
+ -ms-hyphens: $mode; // IE10+
256
+ -o-hyphens: $mode;
257
+ hyphens: $mode;
258
+ }
259
+
260
+ // Opacity
261
+ @mixin opacity($opacity) {
262
+ opacity: $opacity;
263
+ // IE8 filter
264
+ $opacity-ie: ($opacity * 100);
265
+ filter: #{alpha(opacity=$opacity-ie)};
266
+ }
267
+
268
+
269
+
270
+ // GRADIENTS
271
+ // --------------------------------------------------
272
+
273
+
274
+
275
+ // Horizontal gradient, from left to right
276
+ //
277
+ // Creates two color stops, start and end, by specifying a color and position for each color stop.
278
+ // Color stops are not available in IE9 and below.
279
+ @mixin gradient-horizontal($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) {
280
+ background-image: -webkit-gradient(linear, $start-percent top, $end-percent top, from($start-color), to($end-color)); // Safari 4+, Chrome 2+
281
+ background-image: -webkit-linear-gradient(left, color-stop($start-color $start-percent), color-stop($end-color $end-percent)); // Safari 5.1+, Chrome 10+
282
+ background-image: -moz-linear-gradient(left, $start-color $start-percent, $end-color $end-percent); // FF 3.6+
283
+ background-image: linear-gradient(to right, $start-color $start-percent, $end-color $end-percent); // Standard, IE10
284
+ background-repeat: repeat-x;
285
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=1); // IE9 and down
286
+ }
287
+
288
+ // Vertical gradient, from top to bottom
289
+ //
290
+ // Creates two color stops, start and end, by specifying a color and position for each color stop.
291
+ // Color stops are not available in IE9 and below.
292
+ @mixin gradient-vertical($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) {
293
+ background-image: -webkit-gradient(linear, left $start-percent, left $end-percent, from($start-color), to($end-color)); // Safari 4+, Chrome 2+
294
+ background-image: -webkit-linear-gradient(top, $start-color $start-percent, $end-color $end-percent); // Safari 5.1+, Chrome 10+
295
+ background-image: -moz-linear-gradient(top, $start-color $start-percent, $end-color $end-percent); // FF 3.6+
296
+ background-image: linear-gradient(to bottom, $start-color $start-percent, $end-color $end-percent); // Standard, IE10
297
+ background-repeat: repeat-x;
298
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=0); // IE9 and down
299
+ }
300
+
301
+ @mixin gradient-directional($start-color: #555, $end-color: #333, $deg: 45deg) {
302
+ background-repeat: repeat-x;
303
+ background-image: -webkit-linear-gradient($deg, $start-color, $end-color); // Safari 5.1+, Chrome 10+
304
+ background-image: -moz-linear-gradient($deg, $start-color, $end-color); // FF 3.6+
305
+ background-image: linear-gradient($deg, $start-color, $end-color); // Standard, IE10
306
+ }
307
+ @mixin gradient-horizontal-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f) {
308
+ background-image: -webkit-gradient(left, linear, 0 0, 0 100%, from($start-color), color-stop($color-stop, $mid-color), to($end-color));
309
+ background-image: -webkit-linear-gradient(left, $start-color, $mid-color $color-stop, $end-color);
310
+ background-image: -moz-linear-gradient(left, $start-color, $mid-color $color-stop, $end-color);
311
+ background-image: linear-gradient(to right, $start-color, $mid-color $color-stop, $end-color);
312
+ background-repeat: no-repeat;
313
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=1); // IE9 and down, gets no color-stop at all for proper fallback
314
+ }
315
+ @mixin gradient-vertical-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f) {
316
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from($start-color), color-stop($color-stop, $mid-color), to($end-color));
317
+ background-image: -webkit-linear-gradient($start-color, $mid-color $color-stop, $end-color);
318
+ background-image: -moz-linear-gradient(top, $start-color, $mid-color $color-stop, $end-color);
319
+ background-image: linear-gradient($start-color, $mid-color $color-stop, $end-color);
320
+ background-repeat: no-repeat;
321
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=0); // IE9 and down, gets no color-stop at all for proper fallback
322
+ }
323
+ @mixin gradient-radial($inner-color: #555, $outer-color: #333) {
324
+ background-image: -webkit-gradient(radial, center center, 0, center center, 460, from($inner-color), to($outer-color));
325
+ background-image: -webkit-radial-gradient(circle, $inner-color, $outer-color);
326
+ background-image: -moz-radial-gradient(circle, $inner-color, $outer-color);
327
+ background-image: radial-gradient(circle, $inner-color, $outer-color);
328
+ background-repeat: no-repeat;
329
+ }
330
+ @mixin gradient-striped($color: rgba(255,255,255,.15), $angle: 45deg) {
331
+ background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(.25, $color), color-stop(.25, transparent), color-stop(.5, transparent), color-stop(.5, $color), color-stop(.75, $color), color-stop(.75, transparent), to(transparent));
332
+ background-image: -webkit-linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
333
+ background-image: -moz-linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
334
+ background-image: linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
335
+ }
336
+
337
+ // Reset filters for IE
338
+ //
339
+ // When you need to remove a gradient background, do not forget to use this to reset
340
+ // the IE filter for IE9 and below.
341
+ @mixin reset-filter() {
342
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
343
+ }
344
+
345
+
346
+
347
+ // Retina images
348
+ //
349
+ // Short retina mixin for setting background-image and -size
350
+
351
+ @mixin img-retina($file-1x, $file-2x, $width-1x, $height-1x) {
352
+ background-image: image-url("#{$file-1x}");
353
+
354
+ @media
355
+ only screen and (-webkit-min-device-pixel-ratio: 2),
356
+ only screen and ( min--moz-device-pixel-ratio: 2),
357
+ only screen and ( -o-min-device-pixel-ratio: 2/1),
358
+ only screen and ( min-device-pixel-ratio: 2),
359
+ only screen and ( min-resolution: 192dpi),
360
+ only screen and ( min-resolution: 2dppx) {
361
+ background-image: image-url("#{$file-2x}");
362
+ background-size: $width-1x $height-1x;
363
+ }
364
+ }
365
+
366
+
367
+ // Responsive image
368
+ //
369
+ // Keep images from scaling beyond the width of their parents.
370
+
371
+ @mixin img-responsive($display: block) {
372
+ display: $display;
373
+ max-width: 100%; // Part 1: Set a maximum relative to the parent
374
+ height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching
375
+ }
376
+
377
+
378
+ // COMPONENT MIXINS
379
+ // --------------------------------------------------
380
+
381
+ // Horizontal dividers
382
+ // -------------------------
383
+ // Dividers (basically an hr) within dropdowns and nav lists
384
+ @mixin nav-divider($color: #e5e5e5) {
385
+ height: 1px;
386
+ margin: (($line-height-computed / 2) - 1) 0;
387
+ overflow: hidden;
388
+ background-color: $color;
389
+ }
390
+
391
+ // Panels
392
+ // -------------------------
393
+ @mixin panel-variant($border, $heading-text-color, $heading-bg-color, $heading-border) {
394
+ border-color: $border;
395
+
396
+ & > .panel-heading {
397
+ color: $heading-text-color;
398
+ background-color: $heading-bg-color;
399
+ border-color: $heading-border;
400
+
401
+ + .panel-collapse .panel-body {
402
+ border-top-color: $border;
403
+ }
404
+ & > .dropdown .caret {
405
+ border-color: $heading-text-color transparent;
406
+ }
407
+ }
408
+ & > .panel-footer {
409
+ + .panel-collapse .panel-body {
410
+ border-bottom-color: $border;
411
+ }
412
+ }
413
+ }
414
+
415
+ // Alerts
416
+ // -------------------------
417
+ @mixin alert-variant($background, $border, $text-color) {
418
+ background-color: $background;
419
+ border-color: $border;
420
+ color: $text-color;
421
+
422
+ hr {
423
+ border-top-color: darken($border, 5%);
424
+ }
425
+ .alert-link {
426
+ color: darken($text-color, 10%);
427
+ }
428
+ }
429
+
430
+ // Tables
431
+ // -------------------------
432
+ @mixin table-row-variant($state, $background, $border) {
433
+ // Exact selectors below required to override `.table-striped` and prevent
434
+ // inheritance to nested tables.
435
+ .table > thead > tr,
436
+ .table > tbody > tr,
437
+ .table > tfoot > tr {
438
+ > td.#{$state},
439
+ > th.#{$state},
440
+ &.#{$state} > td,
441
+ &.#{$state} > th {
442
+ background-color: $background;
443
+ }
444
+ }
445
+
446
+ // Hover states for `.table-hover`
447
+ // Note: this is not available for cells or rows within `thead` or `tfoot`.
448
+ .table-hover > tbody > tr {
449
+ > td.#{$state}:hover,
450
+ > th.#{$state}:hover,
451
+ &.#{$state}:hover > td,
452
+ &.#{$state}:hover > th {
453
+ background-color: darken($background, 5%);
454
+ }
455
+ }
456
+ }
457
+
458
+ // Button variants
459
+ // -------------------------
460
+ // Easily pump out default styles, as well as :hover, :focus, :active,
461
+ // and disabled options for all buttons
462
+ @mixin button-variant($color, $background, $border) {
463
+ color: $color;
464
+ background-color: $background;
465
+ border-color: $border;
466
+
467
+ &:hover,
468
+ &:focus,
469
+ &:active,
470
+ &.active {
471
+ color: $color;
472
+ background-color: darken($background, 8%);
473
+ border-color: darken($border, 12%);
474
+ }
475
+ .open & { &.dropdown-toggle {
476
+ color: $color;
477
+ background-color: darken($background, 8%);
478
+ border-color: darken($border, 12%);
479
+ } }
480
+ &:active,
481
+ &.active {
482
+ background-image: none;
483
+ }
484
+ .open & { &.dropdown-toggle {
485
+ background-image: none;
486
+ } }
487
+ &.disabled,
488
+ &[disabled],
489
+ fieldset[disabled] & {
490
+ &,
491
+ &:hover,
492
+ &:focus,
493
+ &:active,
494
+ &.active {
495
+ background-color: $background;
496
+ border-color: $border;
497
+ }
498
+ }
499
+ }
500
+
501
+ // Button sizes
502
+ // -------------------------
503
+ @mixin button-size($padding-vertical, $padding-horizontal, $font-size, $line-height, $border-radius) {
504
+ padding: $padding-vertical $padding-horizontal;
505
+ font-size: $font-size;
506
+ line-height: $line-height;
507
+ border-radius: $border-radius;
508
+ }
509
+
510
+ // Pagination
511
+ // -------------------------
512
+ @mixin pagination-size($padding-vertical, $padding-horizontal, $font-size, $border-radius) {
513
+ > li {
514
+ > a,
515
+ > span {
516
+ padding: $padding-vertical $padding-horizontal;
517
+ font-size: $font-size;
518
+ }
519
+ &:first-child {
520
+ > a,
521
+ > span {
522
+ @include border-left-radius($border-radius);
523
+ }
524
+ }
525
+ &:last-child {
526
+ > a,
527
+ > span {
528
+ @include border-right-radius($border-radius);
529
+ }
530
+ }
531
+ }
532
+ }
533
+
534
+ // Labels
535
+ // -------------------------
536
+ @mixin label-variant($color) {
537
+ background-color: $color;
538
+ &[href] {
539
+ &:hover,
540
+ &:focus {
541
+ background-color: darken($color, 10%);
542
+ }
543
+ }
544
+ }
545
+
546
+ // Navbar vertical align
547
+ // -------------------------
548
+ // Vertically center elements in the navbar.
549
+ // Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin.
550
+ @mixin navbar-vertical-align($element-height) {
551
+ margin-top: (($navbar-height - $element-height) / 2);
552
+ margin-bottom: (($navbar-height - $element-height) / 2);
553
+ }
554
+
555
+ // Progress bars
556
+ // -------------------------
557
+ @mixin progress-bar-variant($color) {
558
+ background-color: $color;
559
+ .progress-striped & {
560
+ @include gradient-striped();
561
+ }
562
+ }
563
+
564
+ // Responsive utilities
565
+ // -------------------------
566
+ // More easily include all the states for responsive-utilities.less.
567
+ // [converter] $parent hack
568
+ @mixin responsive-visibility($parent) {
569
+ #{$parent} { display: block !important; }
570
+ tr#{$parent} { display: table-row !important; }
571
+ th#{$parent},
572
+ td#{$parent} { display: table-cell !important; }
573
+ }
574
+
575
+ // [converter] $parent hack
576
+ @mixin responsive-invisibility($parent) {
577
+ #{$parent},
578
+ tr#{$parent},
579
+ th#{$parent},
580
+ td#{$parent} { display: none !important; }
581
+ }
582
+
583
+
584
+ // Grid System
585
+ // -----------
586
+
587
+ // Centered container element
588
+ @mixin container-fixed() {
589
+ margin-right: auto;
590
+ margin-left: auto;
591
+ padding-left: ($grid-gutter-width / 2);
592
+ padding-right: ($grid-gutter-width / 2);
593
+ @include clearfix();
594
+ }
595
+
596
+ // Creates a wrapper for a series of columns
597
+ @mixin make-row($gutter: $grid-gutter-width) {
598
+ margin-left: ($gutter / -2);
599
+ margin-right: ($gutter / -2);
600
+ @include clearfix();
601
+ }
602
+
603
+ // Generate the extra small columns
604
+ @mixin make-xs-column($columns, $gutter: $grid-gutter-width) {
605
+ position: relative;
606
+ float: left;
607
+ width: percentage(($columns / $grid-columns));
608
+ // Prevent columns from collapsing when empty
609
+ min-height: 1px;
610
+ // Inner gutter via padding
611
+ padding-left: ($gutter / 2);
612
+ padding-right: ($gutter / 2);
613
+ }
614
+
615
+ // Generate the small columns
616
+ @mixin make-sm-column($columns, $gutter: $grid-gutter-width) {
617
+ position: relative;
618
+ // Prevent columns from collapsing when empty
619
+ min-height: 1px;
620
+ // Inner gutter via padding
621
+ padding-left: ($gutter / 2);
622
+ padding-right: ($gutter / 2);
623
+
624
+ // Calculate width based on number of columns available
625
+ @media (min-width: $screen-sm-min) {
626
+ float: left;
627
+ width: percentage(($columns / $grid-columns));
628
+ }
629
+ }
630
+
631
+ // Generate the small column offsets
632
+ @mixin make-sm-column-offset($columns) {
633
+ @media (min-width: $screen-sm-min) {
634
+ margin-left: percentage(($columns / $grid-columns));
635
+ }
636
+ }
637
+ @mixin make-sm-column-push($columns) {
638
+ @media (min-width: $screen-sm-min) {
639
+ left: percentage(($columns / $grid-columns));
640
+ }
641
+ }
642
+ @mixin make-sm-column-pull($columns) {
643
+ @media (min-width: $screen-sm-min) {
644
+ right: percentage(($columns / $grid-columns));
645
+ }
646
+ }
647
+
648
+ // Generate the medium columns
649
+ @mixin make-md-column($columns, $gutter: $grid-gutter-width) {
650
+ position: relative;
651
+ // Prevent columns from collapsing when empty
652
+ min-height: 1px;
653
+ // Inner gutter via padding
654
+ padding-left: ($gutter / 2);
655
+ padding-right: ($gutter / 2);
656
+
657
+ // Calculate width based on number of columns available
658
+ @media (min-width: $screen-md-min) {
659
+ float: left;
660
+ width: percentage(($columns / $grid-columns));
661
+ }
662
+ }
663
+
664
+ // Generate the medium column offsets
665
+ @mixin make-md-column-offset($columns) {
666
+ @media (min-width: $screen-md-min) {
667
+ margin-left: percentage(($columns / $grid-columns));
668
+ }
669
+ }
670
+ @mixin make-md-column-push($columns) {
671
+ @media (min-width: $screen-md) {
672
+ left: percentage(($columns / $grid-columns));
673
+ }
674
+ }
675
+ @mixin make-md-column-pull($columns) {
676
+ @media (min-width: $screen-md-min) {
677
+ right: percentage(($columns / $grid-columns));
678
+ }
679
+ }
680
+
681
+ // Generate the large columns
682
+ @mixin make-lg-column($columns, $gutter: $grid-gutter-width) {
683
+ position: relative;
684
+ // Prevent columns from collapsing when empty
685
+ min-height: 1px;
686
+ // Inner gutter via padding
687
+ padding-left: ($gutter / 2);
688
+ padding-right: ($gutter / 2);
689
+
690
+ // Calculate width based on number of columns available
691
+ @media (min-width: $screen-lg-min) {
692
+ float: left;
693
+ width: percentage(($columns / $grid-columns));
694
+ }
695
+ }
696
+
697
+ // Generate the large column offsets
698
+ @mixin make-lg-column-offset($columns) {
699
+ @media (min-width: $screen-lg-min) {
700
+ margin-left: percentage(($columns / $grid-columns));
701
+ }
702
+ }
703
+ @mixin make-lg-column-push($columns) {
704
+ @media (min-width: $screen-lg-min) {
705
+ left: percentage(($columns / $grid-columns));
706
+ }
707
+ }
708
+ @mixin make-lg-column-pull($columns) {
709
+ @media (min-width: $screen-lg-min) {
710
+ right: percentage(($columns / $grid-columns));
711
+ }
712
+ }
713
+
714
+
715
+ // Framework grid generation
716
+ //
717
+ // Used only by Bootstrap to generate the correct number of grid classes given
718
+ // any value of `$grid-columns`.
719
+
720
+ // [converter] Grid converted to use SASS cycles (LESS uses recursive nested mixin defs not supported by SASS)
721
+ @mixin make-grid-columns() {
722
+ $list: '';
723
+ $i: 1;
724
+ $list: ".col-xs-#{$i}, .col-sm-#{$i}, .col-md-#{$i}, .col-lg-#{$i}";
725
+ @for $i from 2 through $grid-columns {
726
+ $list: ".col-xs-#{$i}, .col-sm-#{$i}, .col-md-#{$i}, .col-lg-#{$i}, #{$list}";
727
+ }
728
+ #{$list} {
729
+ position: relative;
730
+ // Prevent columns from collapsing when empty
731
+ min-height: 1px;
732
+ // Inner gutter via padding
733
+ padding-left: ($grid-gutter-width / 2);
734
+ padding-right: ($grid-gutter-width / 2);
735
+ }
736
+ }
737
+
738
+
739
+ // [converter] Grid converted to use SASS cycles (LESS uses recursive nested mixin defs not supported by SASS)
740
+ @mixin make-grid-columns-float($class) {
741
+ $list: '';
742
+ $i: 1;
743
+ $list: ".col-#{$class}-#{$i}";
744
+ @for $i from 2 through $grid-columns {
745
+ $list: ".col-#{$class}-#{$i}, #{$list}";
746
+ }
747
+ #{$list} {
748
+ float: left;
749
+ }
750
+ }
751
+
752
+
753
+ @mixin calc-grid($index, $class, $type) {
754
+ @if ($type == width) and ($index > 0) {
755
+ .col-#{$class}-#{$index} {
756
+ width: percentage(($index / $grid-columns));
757
+ }
758
+ }
759
+ @if ($type == push) {
760
+ .col-#{$class}-push-#{$index} {
761
+ left: percentage(($index / $grid-columns));
762
+ }
763
+ }
764
+ @if ($type == pull) {
765
+ .col-#{$class}-pull-#{$index} {
766
+ right: percentage(($index / $grid-columns));
767
+ }
768
+ }
769
+ @if ($type == offset) {
770
+ .col-#{$class}-offset-#{$index} {
771
+ margin-left: percentage(($index / $grid-columns));
772
+ }
773
+ }
774
+ }
775
+
776
+ // [converter] This is defined recursively in LESS, but SASS supports real loops
777
+ @mixin make-grid($columns, $class, $type) {
778
+ @for $i from 0 through $columns {
779
+ @include calc-grid($i, $class, $type);
780
+ }
781
+ }
782
+
783
+
784
+
785
+ // Form validation states
786
+ //
787
+ // Used in forms.less to generate the form validation CSS for warnings, errors,
788
+ // and successes.
789
+
790
+ @mixin form-control-validation($text-color: #555, $border-color: #ccc, $background-color: #f5f5f5) {
791
+ // Color the label and help text
792
+ .help-block,
793
+ .control-label,
794
+ .radio,
795
+ .checkbox,
796
+ .radio-inline,
797
+ .checkbox-inline {
798
+ color: $text-color;
799
+ }
800
+ // Set the border and box shadow on specific inputs to match
801
+ .form-control {
802
+ border-color: $border-color;
803
+ @include box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work
804
+ &:focus {
805
+ border-color: darken($border-color, 10%);
806
+ $shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten($border-color, 20%);
807
+ @include box-shadow($shadow);
808
+ }
809
+ }
810
+ // Set validation states also for addons
811
+ .input-group-addon {
812
+ color: $text-color;
813
+ border-color: $border-color;
814
+ background-color: $background-color;
815
+ }
816
+ }
817
+
818
+ // Form control focus state
819
+ //
820
+ // Generate a customized focus state and for any input with the specified color,
821
+ // which defaults to the `$input-focus-border` variable.
822
+ //
823
+ // We highly encourage you to not customize the default value, but instead use
824
+ // this to tweak colors on an as-needed basis. This aesthetic change is based on
825
+ // WebKit's default styles, but applicable to a wider range of browsers. Its
826
+ // usability and accessibility should be taken into account with any change.
827
+ //
828
+ // Example usage: change the default blue border and shadow to white for better
829
+ // contrast against a dark gray background.
830
+
831
+ @mixin form-control-focus($color: $input-border-focus) {
832
+ $color-rgba: rgba(red($color), green($color), blue($color), .6);
833
+ &:focus {
834
+ border-color: $color;
835
+ outline: 0;
836
+ @include box-shadow(inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px $color-rgba);
837
+ }
838
+ }
839
+
840
+ // Form control sizing
841
+ //
842
+ // Relative text size, padding, and border-radii changes for form controls. For
843
+ // horizontal sizing, wrap controls in the predefined grid classes. `<select>`
844
+ // element gets special love because it's special, and that's a fact!
845
+
846
+ // [converter] $parent hack
847
+ @mixin input-size($parent, $input-height, $padding-vertical, $padding-horizontal, $font-size, $line-height, $border-radius) {
848
+ #{$parent} { height: $input-height;
849
+ padding: $padding-vertical $padding-horizontal;
850
+ font-size: $font-size;
851
+ line-height: $line-height;
852
+ border-radius: $border-radius; }
853
+ select#{$parent} {
854
+ height: $input-height;
855
+ line-height: $input-height;
856
+ }
857
+
858
+ textarea#{$parent} {
859
+ height: auto;
860
+ }
861
+ }