rails_admin 0.6.5 → 0.6.6
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of rails_admin might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/assets/javascripts/rails_admin/bootstrap/bootstrap-affix.js +99 -74
- data/app/assets/javascripts/rails_admin/bootstrap/bootstrap-alert.js +48 -55
- data/app/assets/javascripts/rails_admin/bootstrap/bootstrap-button.js +70 -65
- data/app/assets/javascripts/rails_admin/bootstrap/bootstrap-carousel.js +163 -147
- data/app/assets/javascripts/rails_admin/bootstrap/bootstrap-collapse.js +117 -114
- data/app/assets/javascripts/rails_admin/bootstrap/bootstrap-dropdown.js +89 -107
- data/app/assets/javascripts/rails_admin/bootstrap/bootstrap-modal.js +208 -175
- data/app/assets/javascripts/rails_admin/bootstrap/bootstrap-popover.js +77 -78
- data/app/assets/javascripts/rails_admin/bootstrap/bootstrap-scrollspy.js +137 -129
- data/app/assets/javascripts/rails_admin/bootstrap/bootstrap-tab.js +85 -101
- data/app/assets/javascripts/rails_admin/bootstrap/bootstrap-tooltip.js +364 -268
- data/app/assets/javascripts/rails_admin/bootstrap/bootstrap-transition.js +51 -52
- data/app/assets/javascripts/rails_admin/bootstrap/bootstrap-typeahead.js +1782 -335
- data/app/assets/javascripts/rails_admin/ra.filter-box.js +1 -1
- data/app/assets/javascripts/rails_admin/ra.filtering-multiselect.js +3 -3
- data/app/assets/javascripts/rails_admin/ra.filtering-select.js +1 -1
- data/app/assets/javascripts/rails_admin/ra.remote-form.js +6 -2
- data/app/assets/stylesheets/rails_admin/base/theming.scss +34 -14
- data/app/assets/stylesheets/rails_admin/bootstrap/_alerts.scss +47 -58
- data/app/assets/stylesheets/rails_admin/bootstrap/_badges.scss +57 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/_breadcrumbs.scss +12 -10
- data/app/assets/stylesheets/rails_admin/bootstrap/_button-groups.scss +163 -152
- data/app/assets/stylesheets/rails_admin/bootstrap/_buttons.scss +98 -169
- data/app/assets/stylesheets/rails_admin/bootstrap/_carousel.scss +151 -66
- data/app/assets/stylesheets/rails_admin/bootstrap/_close.scss +11 -8
- data/app/assets/stylesheets/rails_admin/bootstrap/_code.scss +36 -29
- data/app/assets/stylesheets/rails_admin/bootstrap/_component-animations.scss +16 -3
- data/app/assets/stylesheets/rails_admin/bootstrap/_dropdowns.scss +115 -148
- data/app/assets/stylesheets/rails_admin/bootstrap/_forms.scss +396 -547
- data/app/assets/stylesheets/rails_admin/bootstrap/_glyphicons.scss +237 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/_grid.scss +74 -11
- data/app/assets/stylesheets/rails_admin/bootstrap/_input-groups.scss +166 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/_jumbotron.scss +48 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/_labels.scss +66 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/_list-group.scss +131 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/_media.scss +8 -7
- data/app/assets/stylesheets/rails_admin/bootstrap/_mixins.scss +36 -693
- data/app/assets/stylesheets/rails_admin/bootstrap/_modals.scss +108 -53
- data/app/assets/stylesheets/rails_admin/bootstrap/_navbar.scss +545 -383
- data/app/assets/stylesheets/rails_admin/bootstrap/_navs.scss +191 -358
- data/app/assets/stylesheets/rails_admin/bootstrap/_normalize.scss +425 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/_pager.scss +45 -33
- data/app/assets/stylesheets/rails_admin/bootstrap/_pagination.scss +70 -105
- data/app/assets/stylesheets/rails_admin/bootstrap/_panels.scss +243 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/_popovers.scss +61 -61
- data/app/assets/stylesheets/rails_admin/bootstrap/_print.scss +101 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/_progress-bars.scss +56 -73
- data/app/assets/stylesheets/rails_admin/bootstrap/_responsive-embed.scss +34 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/_responsive-utilities.scss +150 -50
- data/app/assets/stylesheets/rails_admin/bootstrap/_scaffolding.scss +120 -23
- data/app/assets/stylesheets/rails_admin/bootstrap/_tables.scss +168 -170
- data/app/assets/stylesheets/rails_admin/bootstrap/_theme.scss +258 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/_thumbnails.scss +27 -42
- data/app/assets/stylesheets/rails_admin/bootstrap/_tooltip.scss +49 -24
- data/app/assets/stylesheets/rails_admin/bootstrap/_type.scss +200 -143
- data/app/assets/stylesheets/rails_admin/bootstrap/_utilities.scss +33 -21
- data/app/assets/stylesheets/rails_admin/bootstrap/_variables.scss +764 -215
- data/app/assets/stylesheets/rails_admin/bootstrap/_wells.scss +7 -7
- data/app/assets/stylesheets/rails_admin/bootstrap/bootstrap.scss +47 -60
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_alerts.scss +14 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_background-variant.scss +11 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_border-radius.scss +18 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_buttons.scss +50 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_center-block.scss +7 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_clearfix.scss +22 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_forms.scss +84 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_gradients.scss +58 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_grid-framework.scss +81 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_grid.scss +122 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_hide-text.scss +21 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_image.scss +34 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_labels.scss +12 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_list-group.scss +31 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_nav-divider.scss +10 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_nav-vertical-align.scss +9 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_opacity.scss +8 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_pagination.scss +23 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_panels.scss +24 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_progress-bar.scss +10 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_reset-filter.scss +8 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_resize.scss +6 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_responsive-visibility.scss +21 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_size.scss +10 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_tab-focus.scss +9 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_table-row.scss +28 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_text-emphasis.scss +11 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_text-overflow.scss +8 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_vendor-prefixes.scss +219 -0
- data/app/assets/stylesheets/rails_admin/ra.calendar-additions.scss +17 -0
- data/app/assets/stylesheets/rails_admin/rails_admin.scss.erb +9 -5
- data/app/helpers/rails_admin/application_helper.rb +20 -19
- data/app/helpers/rails_admin/form_builder.rb +14 -11
- data/app/views/kaminari/twitter-bootstrap/_paginator.html.haml +8 -9
- data/app/views/layouts/rails_admin/_navigation.html.haml +5 -5
- data/app/views/layouts/rails_admin/_secondary_navigation.html.haml +1 -1
- data/app/views/layouts/rails_admin/application.html.haml +9 -8
- data/app/views/layouts/rails_admin/pjax.html.haml +4 -3
- data/app/views/rails_admin/main/_form_datetime.html.haml +2 -1
- data/app/views/rails_admin/main/_form_field.html.haml +1 -1
- data/app/views/rails_admin/main/_form_text.html.haml +1 -1
- data/app/views/rails_admin/main/_submit_buttons.html.haml +1 -0
- data/app/views/rails_admin/main/dashboard.html.haml +1 -1
- data/app/views/rails_admin/main/export.html.haml +19 -16
- data/app/views/rails_admin/main/index.html.haml +11 -7
- data/app/views/rails_admin/main/show.html.haml +1 -1
- data/lib/rails_admin/adapters/active_record.rb +2 -2
- data/lib/rails_admin/adapters/mongoid/property.rb +1 -1
- data/lib/rails_admin/config/actions/bulk_delete.rb +0 -1
- data/lib/rails_admin/config/actions/edit.rb +0 -2
- data/lib/rails_admin/config/actions/export.rb +0 -2
- data/lib/rails_admin/config/actions/index.rb +0 -3
- data/lib/rails_admin/config/actions/new.rb +0 -2
- data/lib/rails_admin/config/configurable.rb +1 -1
- data/lib/rails_admin/config/fields/base.rb +9 -0
- data/lib/rails_admin/config/fields/factories/enum.rb +2 -3
- data/lib/rails_admin/config/fields/types/polymorphic_association.rb +4 -0
- data/lib/rails_admin/config/model.rb +2 -1
- data/lib/rails_admin/extensions/paper_trail/auditing_adapter.rb +2 -2
- data/lib/rails_admin/support/csv_converter.rb +22 -42
- data/lib/rails_admin/version.rb +1 -1
- metadata +59 -18
- data/app/assets/stylesheets/rails_admin/bootstrap/_accordion.scss +0 -34
- data/app/assets/stylesheets/rails_admin/bootstrap/_hero-unit.scss +0 -25
- data/app/assets/stylesheets/rails_admin/bootstrap/_labels-badges.scss +0 -83
- data/app/assets/stylesheets/rails_admin/bootstrap/_layouts.scss +0 -16
- data/app/assets/stylesheets/rails_admin/bootstrap/_reset.scss +0 -216
- data/app/assets/stylesheets/rails_admin/bootstrap/_responsive-1200px-min.scss +0 -28
- data/app/assets/stylesheets/rails_admin/bootstrap/_responsive-767px-max.scss +0 -193
- data/app/assets/stylesheets/rails_admin/bootstrap/_responsive-768px-979px.scss +0 -19
- data/app/assets/stylesheets/rails_admin/bootstrap/_responsive-navbar.scss +0 -189
- data/app/assets/stylesheets/rails_admin/bootstrap/_sprites.scss +0 -197
- data/app/assets/stylesheets/rails_admin/bootstrap/responsive.scss +0 -48
@@ -8,9 +8,9 @@
|
|
8
8
|
min-height: 20px;
|
9
9
|
padding: 19px;
|
10
10
|
margin-bottom: 20px;
|
11
|
-
background-color: $
|
12
|
-
border: 1px solid
|
13
|
-
|
11
|
+
background-color: $well-bg;
|
12
|
+
border: 1px solid $well-border;
|
13
|
+
border-radius: $border-radius-base;
|
14
14
|
@include box-shadow(inset 0 1px 1px rgba(0,0,0,.05));
|
15
15
|
blockquote {
|
16
16
|
border-color: #ddd;
|
@@ -19,11 +19,11 @@
|
|
19
19
|
}
|
20
20
|
|
21
21
|
// Sizes
|
22
|
-
.well-
|
22
|
+
.well-lg {
|
23
23
|
padding: 24px;
|
24
|
-
|
24
|
+
border-radius: $border-radius-large;
|
25
25
|
}
|
26
|
-
.well-
|
26
|
+
.well-sm {
|
27
27
|
padding: 9px;
|
28
|
-
|
28
|
+
border-radius: $border-radius-small;
|
29
29
|
}
|
@@ -1,63 +1,50 @@
|
|
1
|
-
/*!
|
2
|
-
* Bootstrap v2.3.2
|
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
1
|
// Core variables and mixins
|
12
|
-
@import "
|
13
|
-
@import "
|
14
|
-
|
15
|
-
//
|
16
|
-
@import "
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
@import "
|
22
|
-
|
23
|
-
|
24
|
-
@import "
|
25
|
-
@import "
|
26
|
-
@import "
|
27
|
-
@import "
|
28
|
-
|
29
|
-
// Components
|
30
|
-
@import "
|
31
|
-
@import "
|
32
|
-
@import "
|
33
|
-
@import "
|
34
|
-
@import "
|
35
|
-
|
36
|
-
|
37
|
-
@import "
|
38
|
-
@import "
|
39
|
-
@import "
|
40
|
-
|
41
|
-
|
42
|
-
@import "
|
43
|
-
@import "
|
44
|
-
@import "
|
45
|
-
@import "
|
46
|
-
@import "
|
47
|
-
|
48
|
-
|
49
|
-
@import "
|
50
|
-
@import "
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
@import "
|
55
|
-
@import "
|
56
|
-
@import "
|
57
|
-
@import "rails_admin/bootstrap/progress-bars";
|
58
|
-
@import "rails_admin/bootstrap/accordion";
|
59
|
-
@import "rails_admin/bootstrap/carousel";
|
60
|
-
@import "rails_admin/bootstrap/hero-unit";
|
2
|
+
@import "variables";
|
3
|
+
@import "mixins";
|
4
|
+
|
5
|
+
// Reset and dependencies
|
6
|
+
@import "normalize";
|
7
|
+
@import "print";
|
8
|
+
@import "glyphicons";
|
9
|
+
|
10
|
+
// Core CSS
|
11
|
+
@import "scaffolding";
|
12
|
+
@import "type";
|
13
|
+
@import "code";
|
14
|
+
@import "grid";
|
15
|
+
@import "tables";
|
16
|
+
@import "forms";
|
17
|
+
@import "buttons";
|
18
|
+
|
19
|
+
// Components
|
20
|
+
@import "component-animations";
|
21
|
+
@import "dropdowns";
|
22
|
+
@import "button-groups";
|
23
|
+
@import "input-groups";
|
24
|
+
@import "navs";
|
25
|
+
@import "navbar";
|
26
|
+
@import "breadcrumbs";
|
27
|
+
@import "pagination";
|
28
|
+
@import "pager";
|
29
|
+
@import "labels";
|
30
|
+
@import "badges";
|
31
|
+
@import "jumbotron";
|
32
|
+
@import "thumbnails";
|
33
|
+
@import "alerts";
|
34
|
+
@import "progress-bars";
|
35
|
+
@import "media";
|
36
|
+
@import "list-group";
|
37
|
+
@import "panels";
|
38
|
+
@import "responsive-embed";
|
39
|
+
@import "wells";
|
40
|
+
@import "close";
|
41
|
+
|
42
|
+
// Components w/ JavaScript
|
43
|
+
@import "modals";
|
44
|
+
@import "tooltip";
|
45
|
+
@import "popovers";
|
46
|
+
@import "carousel";
|
61
47
|
|
62
48
|
// Utility classes
|
63
|
-
@import "
|
49
|
+
@import "utilities";
|
50
|
+
@import "responsive-utilities";
|
@@ -0,0 +1,14 @@
|
|
1
|
+
// Alerts
|
2
|
+
|
3
|
+
@mixin alert-variant($background, $border, $text-color) {
|
4
|
+
background-color: $background;
|
5
|
+
border-color: $border;
|
6
|
+
color: $text-color;
|
7
|
+
|
8
|
+
hr {
|
9
|
+
border-top-color: darken($border, 5%);
|
10
|
+
}
|
11
|
+
.alert-link {
|
12
|
+
color: darken($text-color, 10%);
|
13
|
+
}
|
14
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
// Single side border-radius
|
2
|
+
|
3
|
+
@mixin border-top-radius($radius) {
|
4
|
+
border-top-right-radius: $radius;
|
5
|
+
border-top-left-radius: $radius;
|
6
|
+
}
|
7
|
+
@mixin border-right-radius($radius) {
|
8
|
+
border-bottom-right-radius: $radius;
|
9
|
+
border-top-right-radius: $radius;
|
10
|
+
}
|
11
|
+
@mixin border-bottom-radius($radius) {
|
12
|
+
border-bottom-right-radius: $radius;
|
13
|
+
border-bottom-left-radius: $radius;
|
14
|
+
}
|
15
|
+
@mixin border-left-radius($radius) {
|
16
|
+
border-bottom-left-radius: $radius;
|
17
|
+
border-top-left-radius: $radius;
|
18
|
+
}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
// Button variants
|
2
|
+
//
|
3
|
+
// Easily pump out default styles, as well as :hover, :focus, :active,
|
4
|
+
// and disabled options for all buttons
|
5
|
+
|
6
|
+
@mixin button-variant($color, $background, $border) {
|
7
|
+
color: $color;
|
8
|
+
background-color: $background;
|
9
|
+
border-color: $border;
|
10
|
+
|
11
|
+
&:hover,
|
12
|
+
&:focus,
|
13
|
+
&:active,
|
14
|
+
&.active,
|
15
|
+
.open > &.dropdown-toggle {
|
16
|
+
color: $color;
|
17
|
+
background-color: darken($background, 10%);
|
18
|
+
border-color: darken($border, 12%);
|
19
|
+
}
|
20
|
+
&:active,
|
21
|
+
&.active,
|
22
|
+
.open > &.dropdown-toggle {
|
23
|
+
background-image: none;
|
24
|
+
}
|
25
|
+
&.disabled,
|
26
|
+
&[disabled],
|
27
|
+
fieldset[disabled] & {
|
28
|
+
&,
|
29
|
+
&:hover,
|
30
|
+
&:focus,
|
31
|
+
&:active,
|
32
|
+
&.active {
|
33
|
+
background-color: $background;
|
34
|
+
border-color: $border;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
|
38
|
+
.badge {
|
39
|
+
color: $background;
|
40
|
+
background-color: $color;
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
// Button sizes
|
45
|
+
@mixin button-size($padding-vertical, $padding-horizontal, $font-size, $line-height, $border-radius) {
|
46
|
+
padding: $padding-vertical $padding-horizontal;
|
47
|
+
font-size: $font-size;
|
48
|
+
line-height: $line-height;
|
49
|
+
border-radius: $border-radius;
|
50
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
// Clearfix
|
2
|
+
//
|
3
|
+
// For modern browsers
|
4
|
+
// 1. The space content is one way to avoid an Opera bug when the
|
5
|
+
// contenteditable attribute is included anywhere else in the document.
|
6
|
+
// Otherwise it causes space to appear at the top and bottom of elements
|
7
|
+
// that are clearfixed.
|
8
|
+
// 2. The use of `table` rather than `block` is only necessary if using
|
9
|
+
// `:before` to contain the top-margins of child elements.
|
10
|
+
//
|
11
|
+
// Source: http://nicolasgallagher.com/micro-clearfix-hack/
|
12
|
+
|
13
|
+
@mixin clearfix() {
|
14
|
+
&:before,
|
15
|
+
&:after {
|
16
|
+
content: " "; // 1
|
17
|
+
display: table; // 2
|
18
|
+
}
|
19
|
+
&:after {
|
20
|
+
clear: both;
|
21
|
+
}
|
22
|
+
}
|
@@ -0,0 +1,84 @@
|
|
1
|
+
// Form validation states
|
2
|
+
//
|
3
|
+
// Used in forms.less to generate the form validation CSS for warnings, errors,
|
4
|
+
// and successes.
|
5
|
+
|
6
|
+
@mixin form-control-validation($text-color: #555, $border-color: #ccc, $background-color: #f5f5f5) {
|
7
|
+
// Color the label and help text
|
8
|
+
.help-block,
|
9
|
+
.control-label,
|
10
|
+
.radio,
|
11
|
+
.checkbox,
|
12
|
+
.radio-inline,
|
13
|
+
.checkbox-inline {
|
14
|
+
color: $text-color;
|
15
|
+
}
|
16
|
+
// Set the border and box shadow on specific inputs to match
|
17
|
+
.form-control {
|
18
|
+
border-color: $border-color;
|
19
|
+
@include box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work
|
20
|
+
&:focus {
|
21
|
+
border-color: darken($border-color, 10%);
|
22
|
+
$shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten($border-color, 20%);
|
23
|
+
@include box-shadow($shadow);
|
24
|
+
}
|
25
|
+
}
|
26
|
+
// Set validation states also for addons
|
27
|
+
.input-group-addon {
|
28
|
+
color: $text-color;
|
29
|
+
border-color: $border-color;
|
30
|
+
background-color: $background-color;
|
31
|
+
}
|
32
|
+
// Optional feedback icon
|
33
|
+
.form-control-feedback {
|
34
|
+
color: $text-color;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
|
38
|
+
|
39
|
+
// Form control focus state
|
40
|
+
//
|
41
|
+
// Generate a customized focus state and for any input with the specified color,
|
42
|
+
// which defaults to the `$input-border-focus` variable.
|
43
|
+
//
|
44
|
+
// We highly encourage you to not customize the default value, but instead use
|
45
|
+
// this to tweak colors on an as-needed basis. This aesthetic change is based on
|
46
|
+
// WebKit's default styles, but applicable to a wider range of browsers. Its
|
47
|
+
// usability and accessibility should be taken into account with any change.
|
48
|
+
//
|
49
|
+
// Example usage: change the default blue border and shadow to white for better
|
50
|
+
// contrast against a dark gray background.
|
51
|
+
@mixin form-control-focus($color: $input-border-focus) {
|
52
|
+
$color-rgba: rgba(red($color), green($color), blue($color), .6);
|
53
|
+
&:focus {
|
54
|
+
border-color: $color;
|
55
|
+
outline: 0;
|
56
|
+
@include box-shadow(inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px $color-rgba);
|
57
|
+
}
|
58
|
+
}
|
59
|
+
|
60
|
+
// Form control sizing
|
61
|
+
//
|
62
|
+
// Relative text size, padding, and border-radii changes for form controls. For
|
63
|
+
// horizontal sizing, wrap controls in the predefined grid classes. `<select>`
|
64
|
+
// element gets special love because it's special, and that's a fact!
|
65
|
+
// [converter] $parent hack
|
66
|
+
@mixin input-size($parent, $input-height, $padding-vertical, $padding-horizontal, $font-size, $line-height, $border-radius) {
|
67
|
+
#{$parent} {
|
68
|
+
height: $input-height;
|
69
|
+
padding: $padding-vertical $padding-horizontal;
|
70
|
+
font-size: $font-size;
|
71
|
+
line-height: $line-height;
|
72
|
+
border-radius: $border-radius;
|
73
|
+
}
|
74
|
+
|
75
|
+
select#{$parent} {
|
76
|
+
height: $input-height;
|
77
|
+
line-height: $input-height;
|
78
|
+
}
|
79
|
+
|
80
|
+
textarea#{$parent},
|
81
|
+
select[multiple]#{$parent} {
|
82
|
+
height: auto;
|
83
|
+
}
|
84
|
+
}
|
@@ -0,0 +1,58 @@
|
|
1
|
+
// Gradients
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
// Horizontal gradient, from left to right
|
6
|
+
//
|
7
|
+
// Creates two color stops, start and end, by specifying a color and position for each color stop.
|
8
|
+
// Color stops are not available in IE9 and below.
|
9
|
+
@mixin gradient-horizontal($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) {
|
10
|
+
background-image: -webkit-linear-gradient(left, $start-color $start-percent, $end-color $end-percent); // Safari 5.1-6, Chrome 10+
|
11
|
+
background-image: -o-linear-gradient(left, $start-color $start-percent, $end-color $end-percent); // Opera 12
|
12
|
+
background-image: linear-gradient(to right, $start-color $start-percent, $end-color $end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
|
13
|
+
background-repeat: repeat-x;
|
14
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=1); // IE9 and down
|
15
|
+
}
|
16
|
+
|
17
|
+
// Vertical gradient, from top to bottom
|
18
|
+
//
|
19
|
+
// Creates two color stops, start and end, by specifying a color and position for each color stop.
|
20
|
+
// Color stops are not available in IE9 and below.
|
21
|
+
@mixin gradient-vertical($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) {
|
22
|
+
background-image: -webkit-linear-gradient(top, $start-color $start-percent, $end-color $end-percent); // Safari 5.1-6, Chrome 10+
|
23
|
+
background-image: -o-linear-gradient(top, $start-color $start-percent, $end-color $end-percent); // Opera 12
|
24
|
+
background-image: linear-gradient(to bottom, $start-color $start-percent, $end-color $end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
|
25
|
+
background-repeat: repeat-x;
|
26
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=0); // IE9 and down
|
27
|
+
}
|
28
|
+
|
29
|
+
@mixin gradient-directional($start-color: #555, $end-color: #333, $deg: 45deg) {
|
30
|
+
background-repeat: repeat-x;
|
31
|
+
background-image: -webkit-linear-gradient($deg, $start-color, $end-color); // Safari 5.1-6, Chrome 10+
|
32
|
+
background-image: -o-linear-gradient($deg, $start-color, $end-color); // Opera 12
|
33
|
+
background-image: linear-gradient($deg, $start-color, $end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
|
34
|
+
}
|
35
|
+
@mixin gradient-horizontal-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f) {
|
36
|
+
background-image: -webkit-linear-gradient(left, $start-color, $mid-color $color-stop, $end-color);
|
37
|
+
background-image: -o-linear-gradient(left, $start-color, $mid-color $color-stop, $end-color);
|
38
|
+
background-image: linear-gradient(to right, $start-color, $mid-color $color-stop, $end-color);
|
39
|
+
background-repeat: no-repeat;
|
40
|
+
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
|
41
|
+
}
|
42
|
+
@mixin gradient-vertical-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f) {
|
43
|
+
background-image: -webkit-linear-gradient($start-color, $mid-color $color-stop, $end-color);
|
44
|
+
background-image: -o-linear-gradient($start-color, $mid-color $color-stop, $end-color);
|
45
|
+
background-image: linear-gradient($start-color, $mid-color $color-stop, $end-color);
|
46
|
+
background-repeat: no-repeat;
|
47
|
+
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
|
48
|
+
}
|
49
|
+
@mixin gradient-radial($inner-color: #555, $outer-color: #333) {
|
50
|
+
background-image: -webkit-radial-gradient(circle, $inner-color, $outer-color);
|
51
|
+
background-image: radial-gradient(circle, $inner-color, $outer-color);
|
52
|
+
background-repeat: no-repeat;
|
53
|
+
}
|
54
|
+
@mixin gradient-striped($color: rgba(255,255,255,.15), $angle: 45deg) {
|
55
|
+
background-image: -webkit-linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
|
56
|
+
background-image: -o-linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
|
57
|
+
background-image: linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
|
58
|
+
}
|
@@ -0,0 +1,81 @@
|
|
1
|
+
// Framework grid generation
|
2
|
+
//
|
3
|
+
// Used only by Bootstrap to generate the correct number of grid classes given
|
4
|
+
// any value of `$grid-columns`.
|
5
|
+
|
6
|
+
// [converter] This is defined recursively in LESS, but Sass supports real loops
|
7
|
+
@mixin make-grid-columns($i: 1, $list: ".col-xs-#{$i}, .col-sm-#{$i}, .col-md-#{$i}, .col-lg-#{$i}") {
|
8
|
+
@for $i from (1 + 1) through $grid-columns {
|
9
|
+
$list: "#{$list}, .col-xs-#{$i}, .col-sm-#{$i}, .col-md-#{$i}, .col-lg-#{$i}";
|
10
|
+
}
|
11
|
+
#{$list} {
|
12
|
+
position: relative;
|
13
|
+
// Prevent columns from collapsing when empty
|
14
|
+
min-height: 1px;
|
15
|
+
// Inner gutter via padding
|
16
|
+
padding-left: ($grid-gutter-width / 2);
|
17
|
+
padding-right: ($grid-gutter-width / 2);
|
18
|
+
}
|
19
|
+
}
|
20
|
+
|
21
|
+
|
22
|
+
// [converter] This is defined recursively in LESS, but Sass supports real loops
|
23
|
+
@mixin float-grid-columns($class, $i: 1, $list: ".col-#{$class}-#{$i}") {
|
24
|
+
@for $i from (1 + 1) through $grid-columns {
|
25
|
+
$list: "#{$list}, .col-#{$class}-#{$i}";
|
26
|
+
}
|
27
|
+
#{$list} {
|
28
|
+
float: left;
|
29
|
+
}
|
30
|
+
}
|
31
|
+
|
32
|
+
|
33
|
+
@mixin calc-grid-column($index, $class, $type) {
|
34
|
+
@if ($type == width) and ($index > 0) {
|
35
|
+
.col-#{$class}-#{$index} {
|
36
|
+
width: percentage(($index / $grid-columns));
|
37
|
+
}
|
38
|
+
}
|
39
|
+
@if ($type == push) and ($index > 0) {
|
40
|
+
.col-#{$class}-push-#{$index} {
|
41
|
+
left: percentage(($index / $grid-columns));
|
42
|
+
}
|
43
|
+
}
|
44
|
+
@if ($type == push) and ($index == 0) {
|
45
|
+
.col-#{$class}-push-0 {
|
46
|
+
left: auto;
|
47
|
+
}
|
48
|
+
}
|
49
|
+
@if ($type == pull) and ($index > 0) {
|
50
|
+
.col-#{$class}-pull-#{$index} {
|
51
|
+
right: percentage(($index / $grid-columns));
|
52
|
+
}
|
53
|
+
}
|
54
|
+
@if ($type == pull) and ($index == 0) {
|
55
|
+
.col-#{$class}-pull-0 {
|
56
|
+
right: auto;
|
57
|
+
}
|
58
|
+
}
|
59
|
+
@if ($type == offset) {
|
60
|
+
.col-#{$class}-offset-#{$index} {
|
61
|
+
margin-left: percentage(($index / $grid-columns));
|
62
|
+
}
|
63
|
+
}
|
64
|
+
}
|
65
|
+
|
66
|
+
// [converter] This is defined recursively in LESS, but Sass supports real loops
|
67
|
+
@mixin loop-grid-columns($columns, $class, $type) {
|
68
|
+
@for $i from 0 through $columns {
|
69
|
+
@include calc-grid-column($i, $class, $type);
|
70
|
+
}
|
71
|
+
}
|
72
|
+
|
73
|
+
|
74
|
+
// Create grid for specific class
|
75
|
+
@mixin make-grid($class) {
|
76
|
+
@include float-grid-columns($class);
|
77
|
+
@include loop-grid-columns($grid-columns, $class, width);
|
78
|
+
@include loop-grid-columns($grid-columns, $class, pull);
|
79
|
+
@include loop-grid-columns($grid-columns, $class, push);
|
80
|
+
@include loop-grid-columns($grid-columns, $class, offset);
|
81
|
+
}
|