comfortable_mexican_sofa 2.0.9 → 2.0.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (192) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/comfy/vendor/bootstrap.min.js +3 -3
  3. data/app/assets/stylesheets/comfy/admin/cms/application.sass +1 -2
  4. data/app/assets/stylesheets/comfy/admin/cms/base.sass +12 -13
  5. data/app/assets/stylesheets/comfy/vendor/bootstrap/_alert.scss +3 -1
  6. data/app/assets/stylesheets/comfy/vendor/bootstrap/_button-group.scss +31 -72
  7. data/app/assets/stylesheets/comfy/vendor/bootstrap/_buttons.scss +26 -19
  8. data/app/assets/stylesheets/comfy/vendor/bootstrap/_card.scss +23 -12
  9. data/app/assets/stylesheets/comfy/vendor/bootstrap/_carousel.scss +2 -2
  10. data/app/assets/stylesheets/comfy/vendor/bootstrap/_close.scss +6 -1
  11. data/app/assets/stylesheets/comfy/vendor/bootstrap/_code.scss +4 -12
  12. data/app/assets/stylesheets/comfy/vendor/bootstrap/_custom-forms.scss +124 -84
  13. data/app/assets/stylesheets/comfy/vendor/bootstrap/_dropdown.scss +30 -2
  14. data/app/assets/stylesheets/comfy/vendor/bootstrap/_forms.scss +46 -71
  15. data/app/assets/stylesheets/comfy/vendor/bootstrap/_functions.scss +4 -4
  16. data/app/assets/stylesheets/comfy/vendor/bootstrap/_images.scss +0 -1
  17. data/app/assets/stylesheets/comfy/vendor/bootstrap/_input-group.scss +99 -126
  18. data/app/assets/stylesheets/comfy/vendor/bootstrap/_list-group.scss +2 -1
  19. data/app/assets/stylesheets/comfy/vendor/bootstrap/_modal.scss +24 -9
  20. data/app/assets/stylesheets/comfy/vendor/bootstrap/_nav.scss +2 -2
  21. data/app/assets/stylesheets/comfy/vendor/bootstrap/_navbar.scss +8 -3
  22. data/app/assets/stylesheets/comfy/vendor/bootstrap/_pagination.scss +32 -19
  23. data/app/assets/stylesheets/comfy/vendor/bootstrap/_popover.scss +106 -117
  24. data/app/assets/stylesheets/comfy/vendor/bootstrap/_print.scss +17 -3
  25. data/app/assets/stylesheets/comfy/vendor/bootstrap/_progress.scss +4 -1
  26. data/app/assets/stylesheets/comfy/vendor/bootstrap/_reboot.scss +3 -25
  27. data/app/assets/stylesheets/comfy/vendor/bootstrap/_tables.scss +1 -1
  28. data/app/assets/stylesheets/comfy/vendor/bootstrap/_tooltip.scss +65 -57
  29. data/app/assets/stylesheets/comfy/vendor/bootstrap/_type.scss +2 -2
  30. data/app/assets/stylesheets/comfy/vendor/bootstrap/_variables.scss +174 -108
  31. data/app/assets/stylesheets/comfy/vendor/bootstrap/bootstrap-grid.scss +32 -0
  32. data/app/assets/stylesheets/comfy/vendor/bootstrap/bootstrap-reboot.scss +12 -0
  33. data/app/assets/stylesheets/comfy/vendor/bootstrap/bootstrap.scss +42 -0
  34. data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_background-variant.scss +2 -1
  35. data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_breakpoints.scss +11 -7
  36. data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_buttons.scss +37 -22
  37. data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_caret.scss +30 -0
  38. data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_forms.scss +48 -19
  39. data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_grid-framework.scss +5 -7
  40. data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_hover.scss +24 -46
  41. data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_list-group.scss +10 -13
  42. data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_screen-reader.scss +1 -1
  43. data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_text-hide.scss +1 -0
  44. data/app/assets/stylesheets/comfy/vendor/bootstrap/utilities/_borders.scss +6 -1
  45. data/app/assets/stylesheets/comfy/vendor/bootstrap/utilities/_display.scss +10 -28
  46. data/app/controllers/comfy/admin/cms/files_controller.rb +6 -7
  47. data/app/helpers/comfy/admin/cms_helper.rb +5 -4
  48. data/app/models/concerns/comfy/cms/with_categories.rb +20 -9
  49. data/app/views/comfy/admin/cms/categories/_edit.html.haml +3 -3
  50. data/app/views/comfy/admin/cms/categories/_form.html.haml +3 -9
  51. data/app/views/comfy/admin/cms/categories/_index.html.haml +2 -2
  52. data/app/views/comfy/admin/cms/categories/_show.html.haml +4 -3
  53. data/app/views/comfy/admin/cms/categories/create.js.erb +1 -1
  54. data/app/views/comfy/admin/cms/files/_form.html.haml +11 -12
  55. data/app/views/comfy/admin/cms/files/edit.html.haml +2 -2
  56. data/app/views/comfy/admin/cms/files/new.html.haml +2 -2
  57. data/app/views/comfy/admin/cms/fragments/_form_fragment_attachments.html.haml +7 -5
  58. data/app/views/comfy/admin/cms/fragments/_form_fragments.html.haml +1 -1
  59. data/app/views/comfy/admin/cms/layouts/_form.html.haml +3 -2
  60. data/app/views/comfy/admin/cms/layouts/edit.html.haml +1 -1
  61. data/app/views/comfy/admin/cms/layouts/new.html.haml +2 -2
  62. data/app/views/comfy/admin/cms/pages/_form.html.haml +3 -5
  63. data/app/views/comfy/admin/cms/pages/edit.html.haml +1 -1
  64. data/app/views/comfy/admin/cms/pages/new.html.haml +1 -1
  65. data/app/views/comfy/admin/cms/revisions/show.html.haml +2 -2
  66. data/app/views/comfy/admin/cms/sites/_form.html.haml +4 -4
  67. data/app/views/comfy/admin/cms/sites/edit.html.haml +1 -1
  68. data/app/views/comfy/admin/cms/sites/new.html.haml +2 -2
  69. data/app/views/comfy/admin/cms/snippets/_form.html.haml +2 -2
  70. data/app/views/comfy/admin/cms/snippets/edit.html.haml +1 -1
  71. data/app/views/comfy/admin/cms/snippets/new.html.haml +2 -2
  72. data/app/views/comfy/admin/cms/translations/_form.html.haml +5 -7
  73. data/app/views/comfy/admin/cms/translations/edit.html.haml +1 -1
  74. data/app/views/comfy/admin/cms/translations/new.html.haml +2 -2
  75. data/comfortable_mexican_sofa.gemspec +6 -3
  76. data/config/locales/fr.yml +33 -33
  77. data/lib/comfortable_mexican_sofa/content/tags/file.rb +1 -1
  78. data/lib/comfortable_mexican_sofa/content/tags/files.rb +1 -1
  79. data/lib/comfortable_mexican_sofa/form_builder.rb +10 -15
  80. data/lib/comfortable_mexican_sofa/seeds.rb +2 -5
  81. data/lib/comfortable_mexican_sofa/version.rb +1 -1
  82. metadata +9 -116
  83. data/app/assets/stylesheets/comfy/vendor/_bootstrap.scss +0 -42
  84. data/doc/preview.jpg +0 -0
  85. data/test/controllers/comfy/admin/cms/base_controller_test.rb +0 -18
  86. data/test/controllers/comfy/admin/cms/categories_controller_test.rb +0 -74
  87. data/test/controllers/comfy/admin/cms/files_controller_test.rb +0 -242
  88. data/test/controllers/comfy/admin/cms/layouts_controller_test.rb +0 -137
  89. data/test/controllers/comfy/admin/cms/pages_controller_test.rb +0 -580
  90. data/test/controllers/comfy/admin/cms/revisions/layout_controller_test.rb +0 -62
  91. data/test/controllers/comfy/admin/cms/revisions/page_controller_test.rb +0 -87
  92. data/test/controllers/comfy/admin/cms/revisions/snippet_controller_test.rb +0 -60
  93. data/test/controllers/comfy/admin/cms/revisions/translation_controller_test.rb +0 -68
  94. data/test/controllers/comfy/admin/cms/sites_controller_test.rb +0 -106
  95. data/test/controllers/comfy/admin/cms/snippets_controller_test.rb +0 -156
  96. data/test/controllers/comfy/admin/cms/translations_controller_test.rb +0 -182
  97. data/test/controllers/comfy/cms/assets_controller_test.rb +0 -61
  98. data/test/controllers/comfy/cms/content_controller_test.rb +0 -249
  99. data/test/fixtures/active_storage/attachments.yml +0 -9
  100. data/test/fixtures/active_storage/blobs.yml +0 -13
  101. data/test/fixtures/comfy/cms/categories.yml +0 -4
  102. data/test/fixtures/comfy/cms/categorizations.yml +0 -3
  103. data/test/fixtures/comfy/cms/files.yml +0 -5
  104. data/test/fixtures/comfy/cms/fragments.yml +0 -25
  105. data/test/fixtures/comfy/cms/layouts.yml +0 -34
  106. data/test/fixtures/comfy/cms/pages.yml +0 -24
  107. data/test/fixtures/comfy/cms/revisions.yml +0 -29
  108. data/test/fixtures/comfy/cms/sites.yml +0 -5
  109. data/test/fixtures/comfy/cms/snippets.yml +0 -6
  110. data/test/fixtures/comfy/cms/translations.yml +0 -7
  111. data/test/fixtures/files/data.zip +0 -0
  112. data/test/fixtures/files/document.pdf +0 -0
  113. data/test/fixtures/files/image.gif +0 -0
  114. data/test/fixtures/files/image.jpg +0 -0
  115. data/test/fixtures/generators/cms/application.rb +0 -7
  116. data/test/fixtures/generators/cms/routes.rb +0 -5
  117. data/test/fixtures/generators/scaffold/controller.rb +0 -62
  118. data/test/fixtures/generators/scaffold/migration.rb +0 -9
  119. data/test/fixtures/generators/scaffold/model.rb +0 -21
  120. data/test/fixtures/generators/scaffold/routes.rb +0 -6
  121. data/test/fixtures/generators/scaffold/tests/controller.rb +0 -111
  122. data/test/fixtures/generators/scaffold/tests/fixture +0 -2
  123. data/test/fixtures/generators/scaffold/tests/model.rb +0 -24
  124. data/test/fixtures/generators/scaffold/views/_form.haml +0 -5
  125. data/test/fixtures/generators/scaffold/views/edit.haml +0 -5
  126. data/test/fixtures/generators/scaffold/views/index.haml +0 -21
  127. data/test/fixtures/generators/scaffold/views/new.haml +0 -5
  128. data/test/fixtures/generators/scaffold/views/show.haml +0 -4
  129. data/test/fixtures/views/_nav_hook.html.erb +0 -1
  130. data/test/fixtures/views/_nav_hook_2.html.erb +0 -1
  131. data/test/fixtures/views/render_test/_test.html.erb +0 -1
  132. data/test/fixtures/views/render_test/new.html.erb +0 -1
  133. data/test/fixtures/views/render_test/render_layout.html.erb +0 -1
  134. data/test/gemfiles/5.2.gemfile +0 -19
  135. data/test/generators/cms_assets_generator_test.rb +0 -14
  136. data/test/generators/cms_controllers_generator_test.rb +0 -14
  137. data/test/generators/cms_generator_test.rb +0 -26
  138. data/test/generators/cms_models_generator_test.rb +0 -14
  139. data/test/generators/cms_views_generator_test.rb +0 -14
  140. data/test/generators/scaffold_generator_test.rb +0 -32
  141. data/test/helpers/cms_helper_test.rb +0 -106
  142. data/test/integration/access_control_test.rb +0 -179
  143. data/test/integration/i18n_test.rb +0 -38
  144. data/test/integration/meta_variables_test.rb +0 -27
  145. data/test/integration/render_cms_test.rb +0 -255
  146. data/test/integration/routing_test.rb +0 -19
  147. data/test/integration/seeds_test.rb +0 -75
  148. data/test/integration/sites_test.rb +0 -107
  149. data/test/integration/view_hooks_test.rb +0 -47
  150. data/test/lib/configuration_test.rb +0 -38
  151. data/test/lib/content/block_test.rb +0 -26
  152. data/test/lib/content/params_parser_test.rb +0 -126
  153. data/test/lib/content/renderer_test.rb +0 -276
  154. data/test/lib/content/tag_test.rb +0 -58
  155. data/test/lib/content/tags/asset_test.rb +0 -104
  156. data/test/lib/content/tags/checkbox_test.rb +0 -21
  157. data/test/lib/content/tags/date_test.rb +0 -21
  158. data/test/lib/content/tags/datetime_test.rb +0 -21
  159. data/test/lib/content/tags/file_link_test.rb +0 -91
  160. data/test/lib/content/tags/file_test.rb +0 -69
  161. data/test/lib/content/tags/files_test.rb +0 -52
  162. data/test/lib/content/tags/fragment_test.rb +0 -68
  163. data/test/lib/content/tags/helper_test.rb +0 -62
  164. data/test/lib/content/tags/markdown_test.rb +0 -37
  165. data/test/lib/content/tags/number_test.rb +0 -14
  166. data/test/lib/content/tags/partial_test.rb +0 -65
  167. data/test/lib/content/tags/snippet_test.rb +0 -37
  168. data/test/lib/content/tags/template_test.rb +0 -51
  169. data/test/lib/content/tags/text_test.rb +0 -14
  170. data/test/lib/content/tags/textarea_test.rb +0 -14
  171. data/test/lib/content/tags/wysiwyg_test.rb +0 -14
  172. data/test/lib/revisions_test.rb +0 -222
  173. data/test/lib/seeds/files_test.rb +0 -97
  174. data/test/lib/seeds/layouts_test.rb +0 -156
  175. data/test/lib/seeds/pages_test.rb +0 -230
  176. data/test/lib/seeds/snippets_test.rb +0 -99
  177. data/test/lib/seeds_test.rb +0 -51
  178. data/test/models/categorization_test.rb +0 -76
  179. data/test/models/category_test.rb +0 -39
  180. data/test/models/file_test.rb +0 -43
  181. data/test/models/fragment_test.rb +0 -132
  182. data/test/models/layout_test.rb +0 -194
  183. data/test/models/page_test.rb +0 -575
  184. data/test/models/site_test.rb +0 -190
  185. data/test/models/snippet_test.rb +0 -56
  186. data/test/models/translation_test.rb +0 -67
  187. data/test/system/layouts_frontend_test.rb +0 -15
  188. data/test/system/pages_frontend_test.rb +0 -15
  189. data/test/system/sites_frontend_test.rb +0 -11
  190. data/test/system/snippets_frontend_test.rb +0 -15
  191. data/test/tasks/cms_seeds_test.rb +0 -34
  192. data/test/test_helper.rb +0 -201
@@ -0,0 +1,32 @@
1
+ /*!
2
+ * Bootstrap Grid v4.0.0 (https://getbootstrap.com)
3
+ * Copyright 2011-2018 The Bootstrap Authors
4
+ * Copyright 2011-2018 Twitter, Inc.
5
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
6
+ */
7
+
8
+ @at-root {
9
+ @-ms-viewport { width: device-width; } // stylelint-disable-line at-rule-no-vendor-prefix
10
+ }
11
+
12
+ html {
13
+ box-sizing: border-box;
14
+ -ms-overflow-style: scrollbar;
15
+ }
16
+
17
+ *,
18
+ *::before,
19
+ *::after {
20
+ box-sizing: inherit;
21
+ }
22
+
23
+ @import "functions";
24
+ @import "variables";
25
+
26
+ @import "mixins/breakpoints";
27
+ @import "mixins/grid-framework";
28
+ @import "mixins/grid";
29
+
30
+ @import "grid";
31
+ @import "utilities/display";
32
+ @import "utilities/flex";
@@ -0,0 +1,12 @@
1
+ /*!
2
+ * Bootstrap Reboot v4.0.0 (https://getbootstrap.com)
3
+ * Copyright 2011-2018 The Bootstrap Authors
4
+ * Copyright 2011-2018 Twitter, Inc.
5
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
6
+ * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
7
+ */
8
+
9
+ @import "functions";
10
+ @import "variables";
11
+ @import "mixins";
12
+ @import "reboot";
@@ -0,0 +1,42 @@
1
+ /*!
2
+ * Bootstrap v4.0.0 (https://getbootstrap.com)
3
+ * Copyright 2011-2018 The Bootstrap Authors
4
+ * Copyright 2011-2018 Twitter, Inc.
5
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
6
+ */
7
+
8
+ @import "functions";
9
+ @import "variables";
10
+ @import "mixins";
11
+ @import "root";
12
+ @import "reboot";
13
+ @import "type";
14
+ @import "images";
15
+ @import "code";
16
+ @import "grid";
17
+ @import "tables";
18
+ @import "forms";
19
+ @import "buttons";
20
+ @import "transitions";
21
+ @import "dropdown";
22
+ @import "button-group";
23
+ @import "input-group";
24
+ @import "custom-forms";
25
+ @import "nav";
26
+ @import "navbar";
27
+ @import "card";
28
+ @import "breadcrumb";
29
+ @import "pagination";
30
+ @import "badge";
31
+ @import "jumbotron";
32
+ @import "alert";
33
+ @import "progress";
34
+ @import "media";
35
+ @import "list-group";
36
+ @import "close";
37
+ @import "modal";
38
+ @import "tooltip";
39
+ @import "popover";
40
+ @import "carousel";
41
+ @import "utilities";
42
+ @import "print";
@@ -6,7 +6,8 @@
6
6
  #{$parent} {
7
7
  background-color: $color !important;
8
8
  }
9
- a#{$parent} {
9
+ a#{$parent},
10
+ button#{$parent} {
10
11
  @include hover-focus {
11
12
  background-color: darken($color, 10%) !important;
12
13
  }
@@ -29,13 +29,17 @@
29
29
  }
30
30
 
31
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.
32
+ // The maximum value is calculated as the minimum of the next one less 0.02px
33
+ // to work around the limitations of `min-` and `max-` prefixes and viewports with fractional widths.
34
+ // See https://www.w3.org/TR/mediaqueries-4/#mq-min-max
35
+ // Uses 0.02px rather than 0.01px to work around a current rounding bug in Safari.
36
+ // See https://bugs.webkit.org/show_bug.cgi?id=178261
33
37
  //
34
38
  // >> breakpoint-max(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
35
- // 767px
39
+ // 767.98px
36
40
  @function breakpoint-max($name, $breakpoints: $grid-breakpoints) {
37
41
  $next: breakpoint-next($name, $breakpoints);
38
- @return if($next, breakpoint-min($next, $breakpoints) - 1px, null);
42
+ @return if($next, breakpoint-min($next, $breakpoints) - .02px, null);
39
43
  }
40
44
 
41
45
  // Returns a blank string if smallest breakpoint, otherwise returns the name with a dash infront.
@@ -86,11 +90,11 @@
86
90
  @content;
87
91
  }
88
92
  } @else if $max == null {
89
- @include media-breakpoint-up($lower) {
93
+ @include media-breakpoint-up($lower, $breakpoints) {
90
94
  @content;
91
95
  }
92
96
  } @else if $min == null {
93
- @include media-breakpoint-down($upper) {
97
+ @include media-breakpoint-down($upper, $breakpoints) {
94
98
  @content;
95
99
  }
96
100
  }
@@ -108,11 +112,11 @@
108
112
  @content;
109
113
  }
110
114
  } @else if $max == null {
111
- @include media-breakpoint-up($name) {
115
+ @include media-breakpoint-up($name, $breakpoints) {
112
116
  @content;
113
117
  }
114
118
  } @else if $min == null {
115
- @include media-breakpoint-down($name) {
119
+ @include media-breakpoint-down($name, $breakpoints) {
116
120
  @content;
117
121
  }
118
122
  }
@@ -19,21 +19,22 @@
19
19
  &.focus {
20
20
  // Avoid using mixin so we can pass custom focus shadow properly
21
21
  @if $enable-shadows {
22
- box-shadow: $btn-box-shadow, 0 0 0 $input-btn-focus-width rgba($border, .5);
22
+ box-shadow: $btn-box-shadow, 0 0 0 $btn-focus-width rgba($border, .5);
23
23
  } @else {
24
- box-shadow: 0 0 0 $input-btn-focus-width rgba($border, .5);
24
+ box-shadow: 0 0 0 $btn-focus-width rgba($border, .5);
25
25
  }
26
26
  }
27
27
 
28
28
  // Disabled comes first so active can properly restyle
29
29
  &.disabled,
30
30
  &:disabled {
31
+ color: color-yiq($background);
31
32
  background-color: $background;
32
33
  border-color: $border;
33
34
  }
34
35
 
35
- &:not([disabled]):not(.disabled):active,
36
- &:not([disabled]):not(.disabled).active,
36
+ &:not(:disabled):not(.disabled):active,
37
+ &:not(:disabled):not(.disabled).active,
37
38
  .show > &.dropdown-toggle {
38
39
  color: color-yiq($active-background);
39
40
  background-color: $active-background;
@@ -42,30 +43,32 @@
42
43
  }
43
44
  border-color: $active-border;
44
45
 
45
- // Avoid using mixin so we can pass custom focus shadow properly
46
- @if $enable-shadows {
47
- box-shadow: $btn-active-box-shadow, 0 0 0 $input-btn-focus-width rgba($border, .5);
48
- } @else {
49
- box-shadow: 0 0 0 $input-btn-focus-width rgba($border, .5);
46
+ &:focus {
47
+ // Avoid using mixin so we can pass custom focus shadow properly
48
+ @if $enable-shadows {
49
+ box-shadow: $btn-active-box-shadow, 0 0 0 $btn-focus-width rgba($border, .5);
50
+ } @else {
51
+ box-shadow: 0 0 0 $btn-focus-width rgba($border, .5);
52
+ }
50
53
  }
51
54
  }
52
55
  }
53
56
 
54
- @mixin button-outline-variant($color, $color-hover: #fff) {
57
+ @mixin button-outline-variant($color, $color-hover: color-yiq($color), $active-background: $color, $active-border: $color) {
55
58
  color: $color;
56
59
  background-color: transparent;
57
60
  background-image: none;
58
61
  border-color: $color;
59
62
 
60
- @include hover {
63
+ &:hover {
61
64
  color: $color-hover;
62
- background-color: $color;
63
- border-color: $color;
65
+ background-color: $active-background;
66
+ border-color: $active-border;
64
67
  }
65
68
 
66
69
  &:focus,
67
70
  &.focus {
68
- box-shadow: 0 0 0 $input-btn-focus-width rgba($color, .5);
71
+ box-shadow: 0 0 0 $btn-focus-width rgba($color, .5);
69
72
  }
70
73
 
71
74
  &.disabled,
@@ -74,14 +77,21 @@
74
77
  background-color: transparent;
75
78
  }
76
79
 
77
- &:not([disabled]):not(.disabled):active,
78
- &:not([disabled]):not(.disabled).active,
80
+ &:not(:disabled):not(.disabled):active,
81
+ &:not(:disabled):not(.disabled).active,
79
82
  .show > &.dropdown-toggle {
80
- color: $color-hover;
81
- background-color: $color;
82
- border-color: $color;
83
- // Avoid using mixin so we can pass custom focus shadow properly
84
- box-shadow: 0 0 0 $input-btn-focus-width rgba($color, .5);
83
+ color: color-yiq($active-background);
84
+ background-color: $active-background;
85
+ border-color: $active-border;
86
+
87
+ &:focus {
88
+ // Avoid using mixin so we can pass custom focus shadow properly
89
+ @if $enable-shadows and $btn-active-box-shadow != none {
90
+ box-shadow: $btn-active-box-shadow, 0 0 0 $btn-focus-width rgba($color, .5);
91
+ } @else {
92
+ box-shadow: 0 0 0 $btn-focus-width rgba($color, .5);
93
+ }
94
+ }
85
95
  }
86
96
  }
87
97
 
@@ -90,5 +100,10 @@
90
100
  padding: $padding-y $padding-x;
91
101
  font-size: $font-size;
92
102
  line-height: $line-height;
93
- @include border-radius($border-radius);
103
+ // Manually declare to provide an override to the browser default
104
+ @if $enable-rounded {
105
+ border-radius: $border-radius;
106
+ } @else {
107
+ border-radius: 0;
108
+ }
94
109
  }
@@ -12,6 +12,18 @@
12
12
  border-left: $caret-width solid transparent;
13
13
  }
14
14
 
15
+ @mixin caret-right {
16
+ border-top: $caret-width solid transparent;
17
+ border-bottom: $caret-width solid transparent;
18
+ border-left: $caret-width solid;
19
+ }
20
+
21
+ @mixin caret-left {
22
+ border-top: $caret-width solid transparent;
23
+ border-right: $caret-width solid;
24
+ border-bottom: $caret-width solid transparent;
25
+ }
26
+
15
27
  @mixin caret($direction: down) {
16
28
  @if $enable-caret {
17
29
  &::after {
@@ -25,6 +37,24 @@
25
37
  @include caret-down;
26
38
  } @else if $direction == up {
27
39
  @include caret-up;
40
+ } @else if $direction == right {
41
+ @include caret-right;
42
+ }
43
+ }
44
+
45
+ @if $direction == left {
46
+ &::after {
47
+ display: none;
48
+ }
49
+
50
+ &::before {
51
+ display: inline-block;
52
+ width: 0;
53
+ height: 0;
54
+ margin-right: $caret-width * .85;
55
+ vertical-align: $caret-width * .85;
56
+ content: "";
57
+ @include caret-left;
28
58
  }
29
59
  }
30
60
 
@@ -15,23 +15,23 @@
15
15
  color: $input-focus-color;
16
16
  background-color: $input-focus-bg;
17
17
  border-color: $input-focus-border-color;
18
- outline: none;
18
+ outline: 0;
19
19
  // Avoid using mixin so we can pass custom focus shadow properly
20
20
  @if $enable-shadows {
21
- box-shadow: $input-box-shadow, $input-btn-focus-box-shadow;
21
+ box-shadow: $input-box-shadow, $input-focus-box-shadow;
22
22
  } @else {
23
- box-shadow: $input-btn-focus-box-shadow;
23
+ box-shadow: $input-focus-box-shadow;
24
24
  }
25
25
  }
26
26
  }
27
27
 
28
28
 
29
29
  @mixin form-validation-state($state, $color) {
30
-
31
30
  .#{$state}-feedback {
32
31
  display: none;
33
- margin-top: .25rem;
34
- font-size: .875rem;
32
+ width: 100%;
33
+ margin-top: $form-feedback-margin-top;
34
+ font-size: $form-feedback-font-size;
35
35
  color: $color;
36
36
  }
37
37
 
@@ -40,13 +40,13 @@
40
40
  top: 100%;
41
41
  z-index: 5;
42
42
  display: none;
43
- width: 250px;
43
+ max-width: 100%; // Contain to parent when possible
44
44
  padding: .5rem;
45
45
  margin-top: .1rem;
46
46
  font-size: .875rem;
47
47
  line-height: 1;
48
48
  color: #fff;
49
- background-color: rgba($color,.8);
49
+ background-color: rgba($color, .8);
50
50
  border-radius: .2rem;
51
51
  }
52
52
 
@@ -57,7 +57,8 @@
57
57
  border-color: $color;
58
58
 
59
59
  &:focus {
60
- box-shadow: 0 0 0 .2rem rgba($color,.25);
60
+ border-color: $color;
61
+ box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
61
62
  }
62
63
 
63
64
  ~ .#{$state}-feedback,
@@ -67,26 +68,46 @@
67
68
  }
68
69
  }
69
70
 
70
-
71
- // TODO: redo check markup lol crap
72
71
  .form-check-input {
73
72
  .was-validated &:#{$state},
74
73
  &.is-#{$state} {
75
- + .form-check-label {
74
+ ~ .form-check-label {
76
75
  color: $color;
77
76
  }
77
+
78
+ ~ .#{$state}-feedback,
79
+ ~ .#{$state}-tooltip {
80
+ display: block;
81
+ }
78
82
  }
79
83
  }
80
84
 
81
- // custom radios and checks
82
85
  .custom-control-input {
83
86
  .was-validated &:#{$state},
84
87
  &.is-#{$state} {
85
- ~ .custom-control-indicator {
86
- background-color: rgba($color, .25);
87
- }
88
- ~ .custom-control-description {
88
+ ~ .custom-control-label {
89
89
  color: $color;
90
+
91
+ &::before {
92
+ background-color: lighten($color, 25%);
93
+ }
94
+ }
95
+
96
+ ~ .#{$state}-feedback,
97
+ ~ .#{$state}-tooltip {
98
+ display: block;
99
+ }
100
+
101
+ &:checked {
102
+ ~ .custom-control-label::before {
103
+ @include gradient-bg(lighten($color, 10%));
104
+ }
105
+ }
106
+
107
+ &:focus {
108
+ ~ .custom-control-label::before {
109
+ box-shadow: 0 0 0 1px $body-bg, 0 0 0 $input-focus-width rgba($color, .25);
110
+ }
90
111
  }
91
112
  }
92
113
  }
@@ -95,13 +116,21 @@
95
116
  .custom-file-input {
96
117
  .was-validated &:#{$state},
97
118
  &.is-#{$state} {
98
- ~ .custom-file-control {
119
+ ~ .custom-file-label {
99
120
  border-color: $color;
100
121
 
101
122
  &::before { border-color: inherit; }
102
123
  }
124
+
125
+ ~ .#{$state}-feedback,
126
+ ~ .#{$state}-tooltip {
127
+ display: block;
128
+ }
129
+
103
130
  &:focus {
104
- box-shadow: 0 0 0 .2rem rgba($color,.25);
131
+ ~ .custom-file-label {
132
+ box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
133
+ }
105
134
  }
106
135
  }
107
136
  }
@@ -46,14 +46,12 @@
46
46
  }
47
47
  }
48
48
 
49
- .order#{$infix}-first {
50
- order: -1;
51
- }
49
+ .order#{$infix}-first { order: -1; }
52
50
 
53
- @for $i from 1 through $columns {
54
- .order#{$infix}-#{$i} {
55
- order: $i;
56
- }
51
+ .order#{$infix}-last { order: $columns + 1; }
52
+
53
+ @for $i from 0 through $columns {
54
+ .order#{$infix}-#{$i} { order: $i; }
57
55
  }
58
56
 
59
57
  // `$columns - 1` because offsetting by the width of an entire row isn't possible