bootstrap 4.0.0.alpha1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of bootstrap might be problematic. Click here for more details.
- checksums.yaml +7 -0
- data/.gitattributes +14 -0
- data/.gitignore +19 -0
- data/.travis.yml +16 -0
- data/CHANGELOG.md +7 -0
- data/Gemfile +13 -0
- data/LICENSE +21 -0
- data/README.md +143 -0
- data/Rakefile +75 -0
- data/assets/javascripts/bootstrap-sprockets.js +11 -0
- data/assets/javascripts/bootstrap.js +3560 -0
- data/assets/javascripts/bootstrap.min.js +220 -0
- data/assets/javascripts/bootstrap/alert.js +192 -0
- data/assets/javascripts/bootstrap/button.js +172 -0
- data/assets/javascripts/bootstrap/carousel.js +478 -0
- data/assets/javascripts/bootstrap/collapse.js +364 -0
- data/assets/javascripts/bootstrap/dropdown.js +293 -0
- data/assets/javascripts/bootstrap/modal.js +536 -0
- data/assets/javascripts/bootstrap/popover.js +201 -0
- data/assets/javascripts/bootstrap/scrollspy.js +320 -0
- data/assets/javascripts/bootstrap/tab.js +263 -0
- data/assets/javascripts/bootstrap/tooltip.js +619 -0
- data/assets/javascripts/bootstrap/util.js +157 -0
- data/assets/stylesheets/_bootstrap-flex.scss +8 -0
- data/assets/stylesheets/_bootstrap-grid.scss +62 -0
- data/assets/stylesheets/_bootstrap-reboot.scss +10 -0
- data/assets/stylesheets/_bootstrap.scss +55 -0
- data/assets/stylesheets/bootstrap/_alert.scss +65 -0
- data/assets/stylesheets/bootstrap/_animation.scss +27 -0
- data/assets/stylesheets/bootstrap/_breadcrumb.scss +23 -0
- data/assets/stylesheets/bootstrap/_button-group.scss +224 -0
- data/assets/stylesheets/bootstrap/_buttons.scss +174 -0
- data/assets/stylesheets/bootstrap/_card.scss +293 -0
- data/assets/stylesheets/bootstrap/_carousel.scss +252 -0
- data/assets/stylesheets/bootstrap/_close.scss +28 -0
- data/assets/stylesheets/bootstrap/_code.scss +58 -0
- data/assets/stylesheets/bootstrap/_custom-forms.scss +225 -0
- data/assets/stylesheets/bootstrap/_dropdown.scss +191 -0
- data/assets/stylesheets/bootstrap/_forms.scss +454 -0
- data/assets/stylesheets/bootstrap/_grid.scss +76 -0
- data/assets/stylesheets/bootstrap/_images.scss +28 -0
- data/assets/stylesheets/bootstrap/_input-group.scss +181 -0
- data/assets/stylesheets/bootstrap/_jumbotron.scss +22 -0
- data/assets/stylesheets/bootstrap/_labels.scss +75 -0
- data/assets/stylesheets/bootstrap/_list-group.scss +128 -0
- data/assets/stylesheets/bootstrap/_media.scss +90 -0
- data/assets/stylesheets/bootstrap/_mixins.scss +54 -0
- data/assets/stylesheets/bootstrap/_modal.scss +146 -0
- data/assets/stylesheets/bootstrap/_nav.scss +155 -0
- data/assets/stylesheets/bootstrap/_navbar.scss +230 -0
- data/assets/stylesheets/bootstrap/_normalize.scss +428 -0
- data/assets/stylesheets/bootstrap/_pager.scss +57 -0
- data/assets/stylesheets/bootstrap/_pagination.scss +82 -0
- data/assets/stylesheets/bootstrap/_popover.scss +140 -0
- data/assets/stylesheets/bootstrap/_print.scss +88 -0
- data/assets/stylesheets/bootstrap/_progress.scss +156 -0
- data/assets/stylesheets/bootstrap/_reboot.scss +298 -0
- data/assets/stylesheets/bootstrap/_responsive-embed.scss +38 -0
- data/assets/stylesheets/bootstrap/_tables.scss +193 -0
- data/assets/stylesheets/bootstrap/_tooltip.scss +85 -0
- data/assets/stylesheets/bootstrap/_type.scss +192 -0
- data/assets/stylesheets/bootstrap/_utilities-responsive.scss +49 -0
- data/assets/stylesheets/bootstrap/_utilities-spacing.scss +78 -0
- data/assets/stylesheets/bootstrap/_utilities.scss +117 -0
- data/assets/stylesheets/bootstrap/_variables.scss +632 -0
- data/assets/stylesheets/bootstrap/mixins/_alert.scss +14 -0
- data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +13 -0
- data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +35 -0
- data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +76 -0
- data/assets/stylesheets/bootstrap/mixins/_buttons.scss +100 -0
- data/assets/stylesheets/bootstrap/mixins/_center-block.scss +7 -0
- data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +7 -0
- data/assets/stylesheets/bootstrap/mixins/_forms.scss +89 -0
- data/assets/stylesheets/bootstrap/mixins/_gradients.scss +43 -0
- data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +44 -0
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +75 -0
- data/assets/stylesheets/bootstrap/mixins/_hover.scss +59 -0
- data/assets/stylesheets/bootstrap/mixins/_image.scss +33 -0
- data/assets/stylesheets/bootstrap/mixins/_label.scss +11 -0
- data/assets/stylesheets/bootstrap/mixins/_list-group.scss +30 -0
- data/assets/stylesheets/bootstrap/mixins/_lists.scss +7 -0
- data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +10 -0
- data/assets/stylesheets/bootstrap/mixins/_navbar-align.scss +9 -0
- data/assets/stylesheets/bootstrap/mixins/_pagination.scss +24 -0
- data/assets/stylesheets/bootstrap/mixins/_progress.scss +18 -0
- data/assets/stylesheets/bootstrap/mixins/_pulls.scss +6 -0
- data/assets/stylesheets/bootstrap/mixins/_reset-filter.scss +8 -0
- data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +18 -0
- data/assets/stylesheets/bootstrap/mixins/_resize.scss +6 -0
- data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +32 -0
- data/assets/stylesheets/bootstrap/mixins/_size.scss +6 -0
- data/assets/stylesheets/bootstrap/mixins/_tab-focus.scss +9 -0
- data/assets/stylesheets/bootstrap/mixins/_table-row.scss +30 -0
- data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +12 -0
- data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +8 -0
- data/assets/stylesheets/bootstrap/mixins/_text-truncate.scss +8 -0
- data/bootstrap.gemspec +36 -0
- data/lib/bootstrap.rb +76 -0
- data/lib/bootstrap/engine.rb +11 -0
- data/lib/bootstrap/version.rb +4 -0
- data/tasks/updater.rb +67 -0
- data/tasks/updater/js.rb +37 -0
- data/tasks/updater/logger.rb +57 -0
- data/tasks/updater/network.rb +101 -0
- data/tasks/updater/scss.rb +34 -0
- data/templates/project/_bootstrap-variables.scss +633 -0
- data/templates/project/manifest.rb +18 -0
- data/templates/project/styles.scss +10 -0
- data/test/compass_test.rb +9 -0
- data/test/dummy_rails/README.rdoc +3 -0
- data/test/dummy_rails/Rakefile +6 -0
- data/test/dummy_rails/app/assets/images/.keep +0 -0
- data/test/dummy_rails/app/assets/javascripts/application.js +7 -0
- data/test/dummy_rails/app/assets/stylesheets/application.sass +1 -0
- data/test/dummy_rails/app/controllers/application_controller.rb +5 -0
- data/test/dummy_rails/app/controllers/pages_controller.rb +4 -0
- data/test/dummy_rails/app/helpers/application_helper.rb +2 -0
- data/test/dummy_rails/app/views/layouts/application.html.erb +14 -0
- data/test/dummy_rails/app/views/pages/root.html.slim +58 -0
- data/test/dummy_rails/config.ru +4 -0
- data/test/dummy_rails/config/application.rb +34 -0
- data/test/dummy_rails/config/boot.rb +5 -0
- data/test/dummy_rails/config/environment.rb +5 -0
- data/test/dummy_rails/config/environments/development.rb +23 -0
- data/test/dummy_rails/config/environments/production.rb +82 -0
- data/test/dummy_rails/config/environments/test.rb +38 -0
- data/test/dummy_rails/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy_rails/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy_rails/config/initializers/inflections.rb +16 -0
- data/test/dummy_rails/config/initializers/mime_types.rb +5 -0
- data/test/dummy_rails/config/initializers/secret_token.rb +18 -0
- data/test/dummy_rails/config/initializers/session_store.rb +3 -0
- data/test/dummy_rails/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy_rails/config/locales/en.yml +3 -0
- data/test/dummy_rails/config/locales/es.yml +3 -0
- data/test/dummy_rails/config/routes.rb +3 -0
- data/test/dummy_rails/log/.keep +0 -0
- data/test/gemfiles/rails_4_2.gemfile +11 -0
- data/test/gemfiles/rails_head.gemfile +19 -0
- data/test/rails_test.rb +19 -0
- data/test/support/dummy_rails_integration.rb +22 -0
- data/test/support/reporting.rb +27 -0
- data/test/test_helper.rb +35 -0
- data/test/test_helper_rails.rb +6 -0
- metadata +433 -0
@@ -0,0 +1,14 @@
|
|
1
|
+
// Alerts
|
2
|
+
|
3
|
+
@mixin alert-variant($background, $border, $body-color) {
|
4
|
+
background-color: $background;
|
5
|
+
border-color: $border;
|
6
|
+
color: $body-color;
|
7
|
+
|
8
|
+
hr {
|
9
|
+
border-top-color: darken($border, 5%);
|
10
|
+
}
|
11
|
+
.alert-link {
|
12
|
+
color: darken($body-color, 10%);
|
13
|
+
}
|
14
|
+
}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
// Single side border-radius
|
2
|
+
|
3
|
+
@mixin border-radius($radius: $border-radius) {
|
4
|
+
@if $enable-rounded {
|
5
|
+
border-radius: $radius;
|
6
|
+
}
|
7
|
+
}
|
8
|
+
|
9
|
+
@mixin border-top-radius($radius) {
|
10
|
+
@if $enable-rounded {
|
11
|
+
border-top-right-radius: $radius;
|
12
|
+
border-top-left-radius: $radius;
|
13
|
+
}
|
14
|
+
}
|
15
|
+
|
16
|
+
@mixin border-right-radius($radius) {
|
17
|
+
@if $enable-rounded {
|
18
|
+
border-bottom-right-radius: $radius;
|
19
|
+
border-top-right-radius: $radius;
|
20
|
+
}
|
21
|
+
}
|
22
|
+
|
23
|
+
@mixin border-bottom-radius($radius) {
|
24
|
+
@if $enable-rounded {
|
25
|
+
border-bottom-right-radius: $radius;
|
26
|
+
border-bottom-left-radius: $radius;
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
30
|
+
@mixin border-left-radius($radius) {
|
31
|
+
@if $enable-rounded {
|
32
|
+
border-bottom-left-radius: $radius;
|
33
|
+
border-top-left-radius: $radius;
|
34
|
+
}
|
35
|
+
}
|
@@ -0,0 +1,76 @@
|
|
1
|
+
// Breakpoint viewport sizes and media queries.
|
2
|
+
//
|
3
|
+
// Breakpoints are defined as a map of (name: minimum width), order from small to large:
|
4
|
+
//
|
5
|
+
// (xs: 0, sm: 544px, md: 768px)
|
6
|
+
//
|
7
|
+
// The map defined in the `$grid-breakpoints` global variable is used as the `$breakpoints` argument by default.
|
8
|
+
|
9
|
+
// Name of the next breakpoint, or null for the last breakpoint.
|
10
|
+
//
|
11
|
+
// >> breakpoint-next(sm)
|
12
|
+
// md
|
13
|
+
// >> breakpoint-next(sm, (xs: 0, sm: 544px, md: 768px))
|
14
|
+
// md
|
15
|
+
// >> breakpoint-next(sm, $breakpoint-names: (xs sm md))
|
16
|
+
// md
|
17
|
+
@function breakpoint-next($name, $breakpoints: $grid-breakpoints, $breakpoint-names: map-keys($breakpoints)) {
|
18
|
+
$n: index($breakpoint-names, $name);
|
19
|
+
@return if($n < length($breakpoint-names), nth($breakpoint-names, $n + 1), null);
|
20
|
+
}
|
21
|
+
|
22
|
+
// Minimum breakpoint width. Null for the smallest (first) breakpoint.
|
23
|
+
//
|
24
|
+
// >> breakpoint-min(sm, (xs: 0, sm: 544px, md: 768px))
|
25
|
+
// 544px
|
26
|
+
@function breakpoint-min($name, $breakpoints: $grid-breakpoints) {
|
27
|
+
$min: map-get($breakpoints, $name);
|
28
|
+
@return if($min != 0, $min, null);
|
29
|
+
}
|
30
|
+
|
31
|
+
// Maximum breakpoint width. Null for the largest (last) breakpoint.
|
32
|
+
// The maximum value is calculated as the minimum of the next one less 0.1.
|
33
|
+
//
|
34
|
+
// >> breakpoint-max(sm, (xs: 0, sm: 544px, md: 768px))
|
35
|
+
// 767px
|
36
|
+
@function breakpoint-max($name, $breakpoints: $grid-breakpoints) {
|
37
|
+
$next: breakpoint-next($name, $breakpoints);
|
38
|
+
@return if($next, breakpoint-min($next, $breakpoints) - 1px, null);
|
39
|
+
}
|
40
|
+
|
41
|
+
// Media of at least the minimum breakpoint width. No query for the smallest breakpoint.
|
42
|
+
// Makes the @content apply to the given breakpoint and wider.
|
43
|
+
@mixin media-breakpoint-up($name, $breakpoints: $grid-breakpoints) {
|
44
|
+
$min: breakpoint-min($name, $breakpoints);
|
45
|
+
@if $min {
|
46
|
+
@media (min-width: $min) {
|
47
|
+
@content;
|
48
|
+
}
|
49
|
+
} @else {
|
50
|
+
@content;
|
51
|
+
}
|
52
|
+
}
|
53
|
+
|
54
|
+
// Media of at most the maximum breakpoint width. No query for the largest breakpoint.
|
55
|
+
// Makes the @content apply to the given breakpoint and narrower.
|
56
|
+
@mixin media-breakpoint-down($name, $breakpoints: $grid-breakpoints) {
|
57
|
+
$max: breakpoint-max($name, $breakpoints);
|
58
|
+
@if $max {
|
59
|
+
@media (max-width: $max) {
|
60
|
+
@content;
|
61
|
+
}
|
62
|
+
} @else {
|
63
|
+
@content;
|
64
|
+
}
|
65
|
+
}
|
66
|
+
|
67
|
+
// Media between the breakpoint's minimum and maximum widths.
|
68
|
+
// No minimum for the smallest breakpoint, and no maximum for the largest one.
|
69
|
+
// Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.
|
70
|
+
@mixin media-breakpoint-only($name, $breakpoints: $grid-breakpoints) {
|
71
|
+
@include media-breakpoint-up($name, $breakpoints) {
|
72
|
+
@include media-breakpoint-down($name, $breakpoints) {
|
73
|
+
@content;
|
74
|
+
}
|
75
|
+
}
|
76
|
+
}
|
@@ -0,0 +1,100 @@
|
|
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
|
+
$active-background: darken($background, 10%);
|
8
|
+
$active-border: darken($border, 12%);
|
9
|
+
|
10
|
+
color: $color;
|
11
|
+
background-color: $background;
|
12
|
+
border-color: $border;
|
13
|
+
@include box-shadow(inset 0 1px 0 rgba(255,255,255,.15), 0 1px 1px rgba(0,0,0,.075));
|
14
|
+
|
15
|
+
@include hover {
|
16
|
+
color: $color;
|
17
|
+
background-color: $active-background;
|
18
|
+
border-color: $active-border;
|
19
|
+
}
|
20
|
+
|
21
|
+
&:focus,
|
22
|
+
&.focus {
|
23
|
+
color: $color;
|
24
|
+
background-color: $active-background;
|
25
|
+
border-color: $active-border;
|
26
|
+
}
|
27
|
+
|
28
|
+
&:active,
|
29
|
+
&.active,
|
30
|
+
.open > &.dropdown-toggle {
|
31
|
+
color: $color;
|
32
|
+
background-color: $active-background;
|
33
|
+
border-color: $active-border;
|
34
|
+
// Remove the gradient for the pressed/active state
|
35
|
+
background-image: none;
|
36
|
+
@include box-shadow(inset 0 3px 5px rgba(0,0,0,.125));
|
37
|
+
|
38
|
+
&:hover,
|
39
|
+
&:focus,
|
40
|
+
&.focus {
|
41
|
+
color: $color;
|
42
|
+
background-color: darken($background, 17%);
|
43
|
+
border-color: darken($border, 25%);
|
44
|
+
}
|
45
|
+
}
|
46
|
+
|
47
|
+
&.disabled,
|
48
|
+
&:disabled {
|
49
|
+
&:focus,
|
50
|
+
&.focus {
|
51
|
+
background-color: $background;
|
52
|
+
border-color: $border;
|
53
|
+
}
|
54
|
+
@include hover {
|
55
|
+
background-color: $background;
|
56
|
+
border-color: $border;
|
57
|
+
}
|
58
|
+
}
|
59
|
+
}
|
60
|
+
|
61
|
+
@mixin button-outline-variant($color) {
|
62
|
+
color: $color;
|
63
|
+
background-image: none;
|
64
|
+
background-color: transparent;
|
65
|
+
border-color: $color;
|
66
|
+
|
67
|
+
&:focus,
|
68
|
+
&.focus,
|
69
|
+
&:active,
|
70
|
+
&.active,
|
71
|
+
.open > &.dropdown-toggle {
|
72
|
+
color: #fff;
|
73
|
+
background-color: $color;
|
74
|
+
border-color: $color;
|
75
|
+
}
|
76
|
+
@include hover {
|
77
|
+
color: #fff;
|
78
|
+
background-color: $color;
|
79
|
+
border-color: $color;
|
80
|
+
}
|
81
|
+
|
82
|
+
&.disabled,
|
83
|
+
&:disabled {
|
84
|
+
&:focus,
|
85
|
+
&.focus {
|
86
|
+
border-color: lighten($color, 20%);
|
87
|
+
}
|
88
|
+
@include hover {
|
89
|
+
border-color: lighten($color, 20%);
|
90
|
+
}
|
91
|
+
}
|
92
|
+
}
|
93
|
+
|
94
|
+
// Button sizes
|
95
|
+
@mixin button-size($padding-y, $padding-x, $font-size, $line-height, $border-radius) {
|
96
|
+
padding: $padding-y $padding-x;
|
97
|
+
font-size: $font-size;
|
98
|
+
line-height: $line-height;
|
99
|
+
@include border-radius($border-radius);
|
100
|
+
}
|
@@ -0,0 +1,89 @@
|
|
1
|
+
// Form validation states
|
2
|
+
//
|
3
|
+
// Used in _forms.scss to generate the form validation CSS for warnings, errors,
|
4
|
+
// and successes.
|
5
|
+
|
6
|
+
@mixin form-control-validation($color) {
|
7
|
+
// Color the label and help text
|
8
|
+
.help-block,
|
9
|
+
.form-control-label,
|
10
|
+
.radio,
|
11
|
+
.checkbox,
|
12
|
+
.radio-inline,
|
13
|
+
.checkbox-inline,
|
14
|
+
&.radio label,
|
15
|
+
&.checkbox label,
|
16
|
+
&.radio-inline label,
|
17
|
+
&.checkbox-inline label {
|
18
|
+
color: $color;
|
19
|
+
}
|
20
|
+
// Set the border and box shadow on specific inputs to match
|
21
|
+
.form-control {
|
22
|
+
border-color: $color;
|
23
|
+
// @include box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work
|
24
|
+
|
25
|
+
&:focus {
|
26
|
+
// border-color: darken($border-color, 10%);
|
27
|
+
// $shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten($border-color, 20%);
|
28
|
+
// @include box-shadow($shadow);
|
29
|
+
}
|
30
|
+
}
|
31
|
+
|
32
|
+
// Set validation states also for addons
|
33
|
+
.input-group-addon {
|
34
|
+
color: $color;
|
35
|
+
border-color: $color;
|
36
|
+
background-color: lighten($color, 40%);
|
37
|
+
}
|
38
|
+
// Optional feedback icon
|
39
|
+
.form-control-feedback {
|
40
|
+
color: $color;
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
// Form control focus state
|
45
|
+
//
|
46
|
+
// Generate a customized focus state and for any input with the specified color,
|
47
|
+
// which defaults to the `@input-border-focus` variable.
|
48
|
+
//
|
49
|
+
// We highly encourage you to not customize the default value, but instead use
|
50
|
+
// this to tweak colors on an as-needed basis. This aesthetic change is based on
|
51
|
+
// WebKit's default styles, but applicable to a wider range of browsers. Its
|
52
|
+
// usability and accessibility should be taken into account with any change.
|
53
|
+
//
|
54
|
+
// Example usage: change the default blue border and shadow to white for better
|
55
|
+
// contrast against a dark gray background.
|
56
|
+
@mixin form-control-focus() {
|
57
|
+
&:focus {
|
58
|
+
border-color: $input-border-focus;
|
59
|
+
outline: none;
|
60
|
+
$shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px $input-box-shadow-focus;
|
61
|
+
@include box-shadow($shadow);
|
62
|
+
}
|
63
|
+
}
|
64
|
+
|
65
|
+
// Form control sizing
|
66
|
+
//
|
67
|
+
// Relative text size, padding, and border-radii changes for form controls. For
|
68
|
+
// horizontal sizing, wrap controls in the predefined grid classes. `<select>`
|
69
|
+
// element gets special love because it's special, and that's a fact!
|
70
|
+
|
71
|
+
@mixin input-size($parent, $input-height, $padding-vertical, $padding-horizontal, $font-size, $line-height, $border-radius) {
|
72
|
+
#{$parent} {
|
73
|
+
height: $input-height;
|
74
|
+
padding: $padding-vertical $padding-horizontal;
|
75
|
+
font-size: $font-size;
|
76
|
+
line-height: $line-height;
|
77
|
+
@include border-radius($border-radius);
|
78
|
+
}
|
79
|
+
|
80
|
+
select#{$parent} {
|
81
|
+
height: $input-height;
|
82
|
+
line-height: $input-height;
|
83
|
+
}
|
84
|
+
|
85
|
+
textarea#{$parent},
|
86
|
+
select[multiple]#{$parent} {
|
87
|
+
height: auto;
|
88
|
+
}
|
89
|
+
}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
// Gradients
|
2
|
+
|
3
|
+
// Horizontal gradient, from left to right
|
4
|
+
//
|
5
|
+
// Creates two color stops, start and end, by specifying a color and position for each color stop.
|
6
|
+
// Color stops are not available in IE9.
|
7
|
+
@mixin gradient-horizontal($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) {
|
8
|
+
background-image: linear-gradient(to right, $start-color $start-percent, $end-color $end-percent);
|
9
|
+
background-repeat: repeat-x;
|
10
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=1); // IE9
|
11
|
+
}
|
12
|
+
|
13
|
+
// Vertical gradient, from top to bottom
|
14
|
+
//
|
15
|
+
// Creates two color stops, start and end, by specifying a color and position for each color stop.
|
16
|
+
// Color stops are not available in IE9.
|
17
|
+
@mixin gradient-vertical($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) {
|
18
|
+
background-image: linear-gradient(to bottom, $start-color $start-percent, $end-color $end-percent);
|
19
|
+
background-repeat: repeat-x;
|
20
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=0); // IE9
|
21
|
+
}
|
22
|
+
|
23
|
+
@mixin gradient-directional($start-color: #555, $end-color: #333, $deg: 45deg) {
|
24
|
+
background-repeat: repeat-x;
|
25
|
+
background-image: linear-gradient($deg, $start-color, $end-color);
|
26
|
+
}
|
27
|
+
@mixin gradient-horizontal-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f) {
|
28
|
+
background-image: linear-gradient(to right, $start-color, $mid-color $color-stop, $end-color);
|
29
|
+
background-repeat: no-repeat;
|
30
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=1); // IE9 gets no color-stop at all for proper fallback
|
31
|
+
}
|
32
|
+
@mixin gradient-vertical-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f) {
|
33
|
+
background-image: linear-gradient($start-color, $mid-color $color-stop, $end-color);
|
34
|
+
background-repeat: no-repeat;
|
35
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=0); // IE9 gets no color-stop at all for proper fallback
|
36
|
+
}
|
37
|
+
@mixin gradient-radial($inner-color: #555, $outer-color: #333) {
|
38
|
+
background-image: radial-gradient(circle, $inner-color, $outer-color);
|
39
|
+
background-repeat: no-repeat;
|
40
|
+
}
|
41
|
+
@mixin gradient-striped($color: rgba(255,255,255,.15), $angle: 45deg) {
|
42
|
+
background-image: linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
|
43
|
+
}
|
@@ -0,0 +1,44 @@
|
|
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
|
+
@mixin make-grid-columns($columns: $grid-columns, $gutter: $grid-gutter-width, $breakpoints: $grid-breakpoints) {
|
7
|
+
// Common properties for all breakpoints
|
8
|
+
%grid-column {
|
9
|
+
position: relative;
|
10
|
+
// Prevent columns from collapsing when empty
|
11
|
+
min-height: 1px;
|
12
|
+
// Inner gutter via padding
|
13
|
+
padding-left: ($gutter / 2);
|
14
|
+
padding-right: ($gutter / 2);
|
15
|
+
}
|
16
|
+
@each $breakpoint in map-keys($breakpoints) {
|
17
|
+
@for $i from 1 through $columns {
|
18
|
+
.col-#{$breakpoint}-#{$i} {
|
19
|
+
@extend %grid-column;
|
20
|
+
}
|
21
|
+
}
|
22
|
+
@include media-breakpoint-up($breakpoint) {
|
23
|
+
// Work around cross-media @extend (https://github.com/sass/sass/issues/1050)
|
24
|
+
%grid-column-float-#{$breakpoint} {
|
25
|
+
float: left;
|
26
|
+
}
|
27
|
+
@for $i from 1 through $columns {
|
28
|
+
.col-#{$breakpoint}-#{$i} {
|
29
|
+
@if not $enable-flex {
|
30
|
+
@extend %grid-column-float-#{$breakpoint};
|
31
|
+
}
|
32
|
+
@include make-col-span($i, $columns);
|
33
|
+
}
|
34
|
+
}
|
35
|
+
@each $modifier in (pull, push, offset) {
|
36
|
+
@for $i from 0 through $columns {
|
37
|
+
.col-#{$breakpoint}-#{$modifier}-#{$i} {
|
38
|
+
@include make-col-modifier($modifier, $i, $columns)
|
39
|
+
}
|
40
|
+
}
|
41
|
+
}
|
42
|
+
}
|
43
|
+
}
|
44
|
+
}
|
@@ -0,0 +1,75 @@
|
|
1
|
+
/// Grid system
|
2
|
+
//
|
3
|
+
// Generate semantic grid columns with these mixins.
|
4
|
+
|
5
|
+
@mixin make-container($gutter: $grid-gutter-width) {
|
6
|
+
margin-left: auto;
|
7
|
+
margin-right: auto;
|
8
|
+
padding-left: ($gutter / 2);
|
9
|
+
padding-right: ($gutter / 2);
|
10
|
+
@if not $enable-flex {
|
11
|
+
@include clearfix();
|
12
|
+
}
|
13
|
+
}
|
14
|
+
|
15
|
+
|
16
|
+
// For each breakpoint, define the maximum width of the container in a media query
|
17
|
+
@mixin make-container-max-widths($max-widths: $container-max-widths) {
|
18
|
+
@each $breakpoint, $container-max-width in $max-widths {
|
19
|
+
@include media-breakpoint-up($breakpoint) {
|
20
|
+
max-width: $container-max-width;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
24
|
+
|
25
|
+
@mixin make-row($gutter: $grid-gutter-width) {
|
26
|
+
@if $enable-flex {
|
27
|
+
display: flex;
|
28
|
+
flex-wrap: wrap;
|
29
|
+
} @else {
|
30
|
+
@include clearfix();
|
31
|
+
}
|
32
|
+
margin-left: ($gutter / -2);
|
33
|
+
margin-right: ($gutter / -2);
|
34
|
+
}
|
35
|
+
|
36
|
+
@mixin make-col($gutter: $grid-gutter-width) {
|
37
|
+
position: relative;
|
38
|
+
@if not $enable-flex {
|
39
|
+
float: left;
|
40
|
+
}
|
41
|
+
min-height: 1px;
|
42
|
+
padding-left: ($gutter / 2);
|
43
|
+
padding-right: ($gutter / 2);
|
44
|
+
}
|
45
|
+
|
46
|
+
@mixin make-col-span($size, $columns: $grid-columns) {
|
47
|
+
@if $enable-flex {
|
48
|
+
flex: 0 0 percentage($size / $columns);
|
49
|
+
} @else {
|
50
|
+
width: percentage($size / $columns);
|
51
|
+
}
|
52
|
+
}
|
53
|
+
|
54
|
+
@mixin make-col-offset($size, $columns: $grid-columns) {
|
55
|
+
margin-left: percentage($size / $columns);
|
56
|
+
}
|
57
|
+
|
58
|
+
@mixin make-col-push($size, $columns: $grid-columns) {
|
59
|
+
left: if($size > 0, percentage($size / $columns), auto);
|
60
|
+
}
|
61
|
+
|
62
|
+
@mixin make-col-pull($size, $columns: $grid-columns) {
|
63
|
+
right: if($size > 0, percentage($size / $columns), auto);
|
64
|
+
}
|
65
|
+
|
66
|
+
@mixin make-col-modifier($type, $size, $columns) {
|
67
|
+
// Work around the lack of dynamic mixin @include support (https://github.com/sass/sass/issues/626)
|
68
|
+
@if $type == push {
|
69
|
+
@include make-col-push($size, $columns);
|
70
|
+
} @else if $type == pull {
|
71
|
+
@include make-col-pull($size, $columns);
|
72
|
+
} @else if $type == offset {
|
73
|
+
@include make-col-offset($size, $columns);
|
74
|
+
}
|
75
|
+
}
|