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.

Files changed (145) hide show
  1. checksums.yaml +7 -0
  2. data/.gitattributes +14 -0
  3. data/.gitignore +19 -0
  4. data/.travis.yml +16 -0
  5. data/CHANGELOG.md +7 -0
  6. data/Gemfile +13 -0
  7. data/LICENSE +21 -0
  8. data/README.md +143 -0
  9. data/Rakefile +75 -0
  10. data/assets/javascripts/bootstrap-sprockets.js +11 -0
  11. data/assets/javascripts/bootstrap.js +3560 -0
  12. data/assets/javascripts/bootstrap.min.js +220 -0
  13. data/assets/javascripts/bootstrap/alert.js +192 -0
  14. data/assets/javascripts/bootstrap/button.js +172 -0
  15. data/assets/javascripts/bootstrap/carousel.js +478 -0
  16. data/assets/javascripts/bootstrap/collapse.js +364 -0
  17. data/assets/javascripts/bootstrap/dropdown.js +293 -0
  18. data/assets/javascripts/bootstrap/modal.js +536 -0
  19. data/assets/javascripts/bootstrap/popover.js +201 -0
  20. data/assets/javascripts/bootstrap/scrollspy.js +320 -0
  21. data/assets/javascripts/bootstrap/tab.js +263 -0
  22. data/assets/javascripts/bootstrap/tooltip.js +619 -0
  23. data/assets/javascripts/bootstrap/util.js +157 -0
  24. data/assets/stylesheets/_bootstrap-flex.scss +8 -0
  25. data/assets/stylesheets/_bootstrap-grid.scss +62 -0
  26. data/assets/stylesheets/_bootstrap-reboot.scss +10 -0
  27. data/assets/stylesheets/_bootstrap.scss +55 -0
  28. data/assets/stylesheets/bootstrap/_alert.scss +65 -0
  29. data/assets/stylesheets/bootstrap/_animation.scss +27 -0
  30. data/assets/stylesheets/bootstrap/_breadcrumb.scss +23 -0
  31. data/assets/stylesheets/bootstrap/_button-group.scss +224 -0
  32. data/assets/stylesheets/bootstrap/_buttons.scss +174 -0
  33. data/assets/stylesheets/bootstrap/_card.scss +293 -0
  34. data/assets/stylesheets/bootstrap/_carousel.scss +252 -0
  35. data/assets/stylesheets/bootstrap/_close.scss +28 -0
  36. data/assets/stylesheets/bootstrap/_code.scss +58 -0
  37. data/assets/stylesheets/bootstrap/_custom-forms.scss +225 -0
  38. data/assets/stylesheets/bootstrap/_dropdown.scss +191 -0
  39. data/assets/stylesheets/bootstrap/_forms.scss +454 -0
  40. data/assets/stylesheets/bootstrap/_grid.scss +76 -0
  41. data/assets/stylesheets/bootstrap/_images.scss +28 -0
  42. data/assets/stylesheets/bootstrap/_input-group.scss +181 -0
  43. data/assets/stylesheets/bootstrap/_jumbotron.scss +22 -0
  44. data/assets/stylesheets/bootstrap/_labels.scss +75 -0
  45. data/assets/stylesheets/bootstrap/_list-group.scss +128 -0
  46. data/assets/stylesheets/bootstrap/_media.scss +90 -0
  47. data/assets/stylesheets/bootstrap/_mixins.scss +54 -0
  48. data/assets/stylesheets/bootstrap/_modal.scss +146 -0
  49. data/assets/stylesheets/bootstrap/_nav.scss +155 -0
  50. data/assets/stylesheets/bootstrap/_navbar.scss +230 -0
  51. data/assets/stylesheets/bootstrap/_normalize.scss +428 -0
  52. data/assets/stylesheets/bootstrap/_pager.scss +57 -0
  53. data/assets/stylesheets/bootstrap/_pagination.scss +82 -0
  54. data/assets/stylesheets/bootstrap/_popover.scss +140 -0
  55. data/assets/stylesheets/bootstrap/_print.scss +88 -0
  56. data/assets/stylesheets/bootstrap/_progress.scss +156 -0
  57. data/assets/stylesheets/bootstrap/_reboot.scss +298 -0
  58. data/assets/stylesheets/bootstrap/_responsive-embed.scss +38 -0
  59. data/assets/stylesheets/bootstrap/_tables.scss +193 -0
  60. data/assets/stylesheets/bootstrap/_tooltip.scss +85 -0
  61. data/assets/stylesheets/bootstrap/_type.scss +192 -0
  62. data/assets/stylesheets/bootstrap/_utilities-responsive.scss +49 -0
  63. data/assets/stylesheets/bootstrap/_utilities-spacing.scss +78 -0
  64. data/assets/stylesheets/bootstrap/_utilities.scss +117 -0
  65. data/assets/stylesheets/bootstrap/_variables.scss +632 -0
  66. data/assets/stylesheets/bootstrap/mixins/_alert.scss +14 -0
  67. data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +13 -0
  68. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +35 -0
  69. data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +76 -0
  70. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +100 -0
  71. data/assets/stylesheets/bootstrap/mixins/_center-block.scss +7 -0
  72. data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +7 -0
  73. data/assets/stylesheets/bootstrap/mixins/_forms.scss +89 -0
  74. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +43 -0
  75. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +44 -0
  76. data/assets/stylesheets/bootstrap/mixins/_grid.scss +75 -0
  77. data/assets/stylesheets/bootstrap/mixins/_hover.scss +59 -0
  78. data/assets/stylesheets/bootstrap/mixins/_image.scss +33 -0
  79. data/assets/stylesheets/bootstrap/mixins/_label.scss +11 -0
  80. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +30 -0
  81. data/assets/stylesheets/bootstrap/mixins/_lists.scss +7 -0
  82. data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +10 -0
  83. data/assets/stylesheets/bootstrap/mixins/_navbar-align.scss +9 -0
  84. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +24 -0
  85. data/assets/stylesheets/bootstrap/mixins/_progress.scss +18 -0
  86. data/assets/stylesheets/bootstrap/mixins/_pulls.scss +6 -0
  87. data/assets/stylesheets/bootstrap/mixins/_reset-filter.scss +8 -0
  88. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +18 -0
  89. data/assets/stylesheets/bootstrap/mixins/_resize.scss +6 -0
  90. data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +32 -0
  91. data/assets/stylesheets/bootstrap/mixins/_size.scss +6 -0
  92. data/assets/stylesheets/bootstrap/mixins/_tab-focus.scss +9 -0
  93. data/assets/stylesheets/bootstrap/mixins/_table-row.scss +30 -0
  94. data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +12 -0
  95. data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +8 -0
  96. data/assets/stylesheets/bootstrap/mixins/_text-truncate.scss +8 -0
  97. data/bootstrap.gemspec +36 -0
  98. data/lib/bootstrap.rb +76 -0
  99. data/lib/bootstrap/engine.rb +11 -0
  100. data/lib/bootstrap/version.rb +4 -0
  101. data/tasks/updater.rb +67 -0
  102. data/tasks/updater/js.rb +37 -0
  103. data/tasks/updater/logger.rb +57 -0
  104. data/tasks/updater/network.rb +101 -0
  105. data/tasks/updater/scss.rb +34 -0
  106. data/templates/project/_bootstrap-variables.scss +633 -0
  107. data/templates/project/manifest.rb +18 -0
  108. data/templates/project/styles.scss +10 -0
  109. data/test/compass_test.rb +9 -0
  110. data/test/dummy_rails/README.rdoc +3 -0
  111. data/test/dummy_rails/Rakefile +6 -0
  112. data/test/dummy_rails/app/assets/images/.keep +0 -0
  113. data/test/dummy_rails/app/assets/javascripts/application.js +7 -0
  114. data/test/dummy_rails/app/assets/stylesheets/application.sass +1 -0
  115. data/test/dummy_rails/app/controllers/application_controller.rb +5 -0
  116. data/test/dummy_rails/app/controllers/pages_controller.rb +4 -0
  117. data/test/dummy_rails/app/helpers/application_helper.rb +2 -0
  118. data/test/dummy_rails/app/views/layouts/application.html.erb +14 -0
  119. data/test/dummy_rails/app/views/pages/root.html.slim +58 -0
  120. data/test/dummy_rails/config.ru +4 -0
  121. data/test/dummy_rails/config/application.rb +34 -0
  122. data/test/dummy_rails/config/boot.rb +5 -0
  123. data/test/dummy_rails/config/environment.rb +5 -0
  124. data/test/dummy_rails/config/environments/development.rb +23 -0
  125. data/test/dummy_rails/config/environments/production.rb +82 -0
  126. data/test/dummy_rails/config/environments/test.rb +38 -0
  127. data/test/dummy_rails/config/initializers/backtrace_silencers.rb +7 -0
  128. data/test/dummy_rails/config/initializers/filter_parameter_logging.rb +4 -0
  129. data/test/dummy_rails/config/initializers/inflections.rb +16 -0
  130. data/test/dummy_rails/config/initializers/mime_types.rb +5 -0
  131. data/test/dummy_rails/config/initializers/secret_token.rb +18 -0
  132. data/test/dummy_rails/config/initializers/session_store.rb +3 -0
  133. data/test/dummy_rails/config/initializers/wrap_parameters.rb +14 -0
  134. data/test/dummy_rails/config/locales/en.yml +3 -0
  135. data/test/dummy_rails/config/locales/es.yml +3 -0
  136. data/test/dummy_rails/config/routes.rb +3 -0
  137. data/test/dummy_rails/log/.keep +0 -0
  138. data/test/gemfiles/rails_4_2.gemfile +11 -0
  139. data/test/gemfiles/rails_head.gemfile +19 -0
  140. data/test/rails_test.rb +19 -0
  141. data/test/support/dummy_rails_integration.rb +22 -0
  142. data/test/support/reporting.rb +27 -0
  143. data/test/test_helper.rb +35 -0
  144. data/test/test_helper_rails.rb +6 -0
  145. metadata +433 -0
@@ -0,0 +1,90 @@
1
+ @if $enable-flex {
2
+ .media {
3
+ display: flex;
4
+ margin-bottom: $spacer;
5
+ }
6
+ .media-body {
7
+ flex: 1;
8
+ }
9
+ .media-middle {
10
+ align-self: center;
11
+ }
12
+ .media-bottom {
13
+ align-self: flex-end;
14
+ }
15
+ } @else {
16
+ .media {
17
+ margin-top: 15px;
18
+
19
+ &:first-child {
20
+ margin-top: 0;
21
+ }
22
+ }
23
+ .media,
24
+ .media-body {
25
+ overflow: hidden;
26
+ zoom: 1;
27
+ }
28
+ .media-body {
29
+ width: 10000px;
30
+ }
31
+ .media-left,
32
+ .media-right,
33
+ .media-body {
34
+ display: table-cell;
35
+ vertical-align: top;
36
+ }
37
+ .media-middle {
38
+ vertical-align: middle;
39
+ }
40
+ .media-bottom {
41
+ vertical-align: bottom;
42
+ }
43
+ }
44
+
45
+
46
+ //
47
+ // Images/elements as the media anchor
48
+ //
49
+
50
+ .media-object {
51
+ display: block;
52
+
53
+ // Fix collapse in webkit from max-width: 100% and display: table-cell.
54
+ &.img-thumbnail {
55
+ max-width: none;
56
+ }
57
+ }
58
+
59
+
60
+ //
61
+ // Alignment
62
+ //
63
+
64
+ .media-right {
65
+ padding-left: 10px;
66
+ }
67
+
68
+ .media-left {
69
+ padding-right: 10px;
70
+ }
71
+
72
+
73
+ //
74
+ // Headings
75
+ //
76
+
77
+ .media-heading {
78
+ margin-top: 0;
79
+ margin-bottom: 5px;
80
+ }
81
+
82
+
83
+ //
84
+ // Media list variation
85
+ //
86
+
87
+ .media-list {
88
+ padding-left: 0;
89
+ list-style: none;
90
+ }
@@ -0,0 +1,54 @@
1
+ // Toggles
2
+ //
3
+ // Used in conjunction with global variables to enable certain theme features.
4
+
5
+ @mixin box-shadow($shadow...) {
6
+ @if $enable-shadows {
7
+ box-shadow: $shadow;
8
+ }
9
+ }
10
+
11
+ @mixin transition($transition...) {
12
+ @if $enable-transitions {
13
+ transition: $transition;
14
+ }
15
+ }
16
+
17
+ // Utilities
18
+ @import "mixins/breakpoints";
19
+ @import "mixins/hover";
20
+ @import "mixins/image";
21
+ @import "mixins/label";
22
+ @import "mixins/reset-filter";
23
+ @import "mixins/resize";
24
+ @import "mixins/screen-reader";
25
+ @import "mixins/size";
26
+ @import "mixins/tab-focus";
27
+ @import "mixins/reset-text";
28
+ @import "mixins/text-emphasis";
29
+ @import "mixins/text-hide";
30
+ @import "mixins/text-truncate";
31
+
32
+ // // Components
33
+ @import "mixins/alert";
34
+ @import "mixins/buttons";
35
+ @import "mixins/pagination";
36
+ @import "mixins/lists";
37
+ @import "mixins/list-group";
38
+ @import "mixins/nav-divider";
39
+ @import "mixins/forms";
40
+ @import "mixins/progress";
41
+ @import "mixins/table-row";
42
+
43
+ // // Skins
44
+ @import "mixins/background-variant";
45
+ @import "mixins/border-radius";
46
+ @import "mixins/gradients";
47
+
48
+ // // Layout
49
+ @import "mixins/clearfix";
50
+ @import "mixins/center-block";
51
+ // @import "mixins/navbar-align";
52
+ @import "mixins/grid-framework";
53
+ @import "mixins/grid";
54
+ @import "mixins/pulls";
@@ -0,0 +1,146 @@
1
+ // .modal-open - body class for killing the scroll
2
+ // .modal - container to scroll within
3
+ // .modal-dialog - positioning shell for the actual modal
4
+ // .modal-content - actual modal w/ bg and corners and shit
5
+
6
+
7
+ // Kill the scroll on the body
8
+ .modal-open {
9
+ overflow: hidden;
10
+ }
11
+
12
+ // Container that the modal scrolls within
13
+ .modal {
14
+ position: fixed;
15
+ top: 0;
16
+ right: 0;
17
+ bottom: 0;
18
+ left: 0;
19
+ z-index: $zindex-modal;
20
+ display: none;
21
+ overflow: hidden;
22
+ // Prevent Chrome on Windows from adding a focus outline. For details, see
23
+ // https://github.com/twbs/bootstrap/pull/10951.
24
+ outline: 0;
25
+ -webkit-overflow-scrolling: touch;
26
+
27
+ // When fading in the modal, animate it to slide down
28
+ &.fade .modal-dialog {
29
+ transition: transform .3s ease-out;
30
+ transform: translate(0, -25%);
31
+ }
32
+ &.in .modal-dialog { transform: translate(0, 0); }
33
+ }
34
+ .modal-open .modal {
35
+ overflow-x: hidden;
36
+ overflow-y: auto;
37
+ }
38
+
39
+ // Shell div to position the modal with bottom padding
40
+ .modal-dialog {
41
+ position: relative;
42
+ width: auto;
43
+ margin: 10px;
44
+ }
45
+
46
+ // Actual modal
47
+ .modal-content {
48
+ position: relative;
49
+ background-color: $modal-content-bg;
50
+ background-clip: padding-box;
51
+ border: 1px solid $modal-content-border-color;
52
+ border-radius: $border-radius-lg;
53
+ @include box-shadow(0 3px 9px rgba(0,0,0,.5));
54
+ // Remove focus outline from opened modal
55
+ outline: 0;
56
+ }
57
+
58
+ // Modal background
59
+ .modal-backdrop {
60
+ position: fixed;
61
+ top: 0;
62
+ right: 0;
63
+ bottom: 0;
64
+ left: 0;
65
+ z-index: $zindex-modal-bg;
66
+ background-color: $modal-backdrop-bg;
67
+
68
+ // Fade for backdrop
69
+ &.fade { opacity: 0; }
70
+ &.in { opacity: $modal-backdrop-opacity; }
71
+ }
72
+
73
+ // Modal header
74
+ // Top section of the modal w/ title and dismiss
75
+ .modal-header {
76
+ padding: $modal-title-padding;
77
+ border-bottom: 1px solid $modal-header-border-color;
78
+ @include clearfix;
79
+ }
80
+ // Close icon
81
+ .modal-header .close {
82
+ margin-top: -2px;
83
+ }
84
+
85
+ // Title text within header
86
+ .modal-title {
87
+ margin: 0;
88
+ line-height: $modal-title-line-height;
89
+ }
90
+
91
+ // Modal body
92
+ // Where all modal content resides (sibling of .modal-header and .modal-footer)
93
+ .modal-body {
94
+ position: relative;
95
+ padding: $modal-inner-padding;
96
+ }
97
+
98
+ // Footer (for actions)
99
+ .modal-footer {
100
+ padding: $modal-inner-padding;
101
+ text-align: right; // right align buttons
102
+ border-top: 1px solid $modal-footer-border-color;
103
+ @include clearfix(); // clear it in case folks use .pull-* classes on buttons
104
+
105
+ // Properly space out buttons
106
+ .btn + .btn {
107
+ margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs
108
+ margin-left: 5px;
109
+ }
110
+ // but override that for button groups
111
+ .btn-group .btn + .btn {
112
+ margin-left: -1px;
113
+ }
114
+ // and override it for block buttons as well
115
+ .btn-block + .btn-block {
116
+ margin-left: 0;
117
+ }
118
+ }
119
+
120
+ // Measure scrollbar width for padding body during modal show/hide
121
+ .modal-scrollbar-measure {
122
+ position: absolute;
123
+ top: -9999px;
124
+ width: 50px;
125
+ height: 50px;
126
+ overflow: scroll;
127
+ }
128
+
129
+ // Scale up the modal
130
+ @include media-breakpoint-up(sm) {
131
+ // Automatically set modal's width for larger viewports
132
+ .modal-dialog {
133
+ width: $modal-md;
134
+ margin: 30px auto;
135
+ }
136
+ .modal-content {
137
+ @include box-shadow(0 5px 15px rgba(0,0,0,.5));
138
+ }
139
+
140
+ // Modal sizes
141
+ .modal-sm { width: $modal-sm; }
142
+ }
143
+
144
+ @include media-breakpoint-up(md) {
145
+ .modal-lg { width: $modal-lg; }
146
+ }
@@ -0,0 +1,155 @@
1
+ // Base class
2
+ //
3
+ // Kickstart any navigation component with a set of style resets. Works with
4
+ // `<nav>`s or `<ul>`s.
5
+
6
+ .nav {
7
+ padding-left: 0;
8
+ margin-bottom: 0;
9
+ list-style: none;
10
+ }
11
+
12
+ .nav-link {
13
+ display: inline-block;
14
+
15
+ @include hover-focus {
16
+ text-decoration: none;
17
+ }
18
+
19
+ // Disabled state lightens text and removes hover/tab effects
20
+ &.disabled {
21
+ color: $nav-disabled-link-color;
22
+
23
+ @include plain-hover-focus {
24
+ color: $nav-disabled-link-hover-color;
25
+ cursor: $cursor-disabled;
26
+ background-color: transparent;
27
+ }
28
+ }
29
+ }
30
+
31
+
32
+ // Nav inline
33
+
34
+ .nav-inline {
35
+ .nav-link + .nav-link {
36
+ margin-left: 1rem;
37
+ }
38
+ }
39
+
40
+
41
+ //
42
+ // Tabs
43
+ //
44
+
45
+ .nav-tabs {
46
+ border-bottom: 1px solid $nav-tabs-border-color;
47
+ @include clearfix();
48
+
49
+ .nav-item {
50
+ float: left;
51
+ // Make the list-items overlay the bottom border
52
+ margin-bottom: -1px;
53
+
54
+ + .nav-item {
55
+ margin-left: .2rem;
56
+ }
57
+ }
58
+
59
+ .nav-link {
60
+ display: block;
61
+ padding: $nav-link-padding;
62
+ border: 1px solid transparent;
63
+ @include border-radius($border-radius $border-radius 0 0);
64
+
65
+ @include hover-focus {
66
+ border-color: $nav-tabs-link-hover-border-color $nav-tabs-link-hover-border-color $nav-tabs-border-color;
67
+ }
68
+
69
+ &.disabled {
70
+ @include plain-hover-focus {
71
+ color: $nav-disabled-link-color;
72
+ background-color: transparent;
73
+ border-color: transparent;
74
+ }
75
+ }
76
+ }
77
+
78
+ .nav-link.active,
79
+ .nav-item.open .nav-link {
80
+ @include plain-hover-focus {
81
+ color: $nav-tabs-active-link-hover-color;
82
+ background-color: $nav-tabs-active-link-hover-bg;
83
+ border-color: $nav-tabs-active-link-hover-border-color $nav-tabs-active-link-hover-border-color transparent;
84
+ }
85
+ }
86
+ }
87
+
88
+
89
+ //
90
+ // Pills
91
+ //
92
+
93
+ .nav-pills {
94
+ .nav-item {
95
+ float: left;
96
+
97
+ + .nav-item {
98
+ margin-left: .2rem;
99
+ }
100
+ }
101
+
102
+ .nav-link {
103
+ display: block;
104
+ padding: $nav-link-padding;
105
+ @include border-radius($nav-pills-border-radius);
106
+ }
107
+
108
+ .nav-link.active,
109
+ .nav-item.open .nav-link {
110
+ @include plain-hover-focus {
111
+ color: $component-active-color;
112
+ cursor: default;
113
+ background-color: $component-active-bg;
114
+ }
115
+ }
116
+ }
117
+
118
+ .nav-stacked {
119
+ .nav-item {
120
+ display: block;
121
+ float: none;
122
+
123
+ + .nav-item {
124
+ margin-top: .2rem;
125
+ margin-left: 0;
126
+ }
127
+ }
128
+ }
129
+
130
+
131
+ //
132
+ // Tabbable tabs
133
+ //
134
+
135
+ // Hide tabbable panes to start, show them when `.active`
136
+ .tab-content {
137
+ > .tab-pane {
138
+ display: none;
139
+ }
140
+ > .active {
141
+ display: block;
142
+ }
143
+ }
144
+
145
+
146
+ //
147
+ // Dropdowns
148
+ //
149
+
150
+ .nav-tabs .dropdown-menu {
151
+ // Make dropdown border overlap tab border
152
+ margin-top: -1px;
153
+ // Remove the top rounded corners here since there is a hard edge above the menu
154
+ @include border-top-radius(0);
155
+ }