comfortable_mexican_sofa 2.0.5 → 2.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/app/assets/javascripts/comfy/admin/cms/application.js.coffee +4 -4
  4. data/app/assets/javascripts/comfy/admin/cms/base.js.coffee +21 -5
  5. data/app/assets/javascripts/comfy/admin/cms/lib/bootstrap.min.js +6 -0
  6. data/app/assets/javascripts/comfy/admin/cms/lib/flatpickr/i18n/{cat.js → ca.js} +4 -4
  7. data/app/assets/javascripts/comfy/admin/cms/lib/popper.min.js +6 -0
  8. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/gr.js +75 -0
  9. data/app/assets/javascripts/comfy/admin/cms/lib/sortable.min.js +5 -0
  10. data/app/assets/stylesheets/comfy/admin/cms/application.sass +1 -2
  11. data/app/assets/stylesheets/comfy/admin/cms/base.sass +20 -4
  12. data/app/assets/stylesheets/comfy/admin/cms/lib/_bootstrap.scss +42 -0
  13. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/_alert.scss +49 -0
  14. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/_badge.scss +47 -0
  15. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/_breadcrumb.scss +38 -0
  16. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/_button-group.scss +207 -0
  17. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/_buttons.scss +136 -0
  18. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/_card.scss +259 -0
  19. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/_carousel.scss +191 -0
  20. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/_close.scss +29 -0
  21. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/_code.scss +64 -0
  22. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/_custom-forms.scss +257 -0
  23. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/_dropdown.scss +103 -0
  24. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/_forms.scss +358 -0
  25. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/_functions.scss +86 -0
  26. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/_grid.scss +52 -0
  27. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/_images.scss +43 -0
  28. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/_input-group.scss +186 -0
  29. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/_jumbotron.scss +16 -0
  30. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/_list-group.scss +114 -0
  31. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/_media.scss +8 -0
  32. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/_mixins.scss +42 -0
  33. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/_modal.scss +153 -0
  34. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/_nav.scss +118 -0
  35. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/_navbar.scss +306 -0
  36. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/_pagination.scss +64 -0
  37. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/_popover.scss +194 -0
  38. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/_print.scss +110 -0
  39. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/_progress.scss +30 -0
  40. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/_reboot.scss +504 -0
  41. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/_root.scss +19 -0
  42. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/_tables.scss +180 -0
  43. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/_tooltip.scss +107 -0
  44. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/_transitions.scss +36 -0
  45. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/_type.scss +125 -0
  46. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/_utilities.scss +14 -0
  47. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/_variables.scss +828 -0
  48. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/mixins/_alert.scss +13 -0
  49. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/mixins/_background-variant.scss +20 -0
  50. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/mixins/_badge.scss +12 -0
  51. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/mixins/_border-radius.scss +35 -0
  52. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/mixins/_box-shadow.scss +5 -0
  53. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/mixins/_breakpoints.scss +119 -0
  54. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/mixins/_buttons.scss +94 -0
  55. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/mixins/_caret.scss +35 -0
  56. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/mixins/_clearfix.scss +7 -0
  57. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/mixins/_float.scss +11 -0
  58. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/mixins/_forms.scss +108 -0
  59. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/mixins/_gradients.scss +45 -0
  60. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/mixins/_grid-framework.scss +69 -0
  61. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/mixins/_grid.scss +52 -0
  62. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/mixins/_hover.scss +61 -0
  63. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/mixins/_image.scss +36 -0
  64. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/mixins/_list-group.scss +24 -0
  65. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/mixins/_lists.scss +7 -0
  66. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/mixins/_nav-divider.scss +10 -0
  67. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/mixins/_navbar-align.scss +10 -0
  68. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/mixins/_pagination.scss +22 -0
  69. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/mixins/_reset-text.scss +17 -0
  70. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/mixins/_resize.scss +6 -0
  71. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/mixins/_screen-reader.scss +35 -0
  72. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/mixins/_size.scss +6 -0
  73. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/mixins/_table-row.scss +30 -0
  74. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/mixins/_text-emphasis.scss +14 -0
  75. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/mixins/_text-hide.scss +8 -0
  76. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/mixins/_text-truncate.scss +8 -0
  77. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/mixins/_transition.scss +9 -0
  78. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/mixins/_visibility.scss +7 -0
  79. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/utilities/_align.scss +8 -0
  80. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/utilities/_background.scss +19 -0
  81. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/utilities/_borders.scss +54 -0
  82. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/utilities/_clearfix.scss +3 -0
  83. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/utilities/_display.scss +56 -0
  84. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/utilities/_embed.scss +52 -0
  85. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/utilities/_flex.scss +46 -0
  86. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/utilities/_float.scss +9 -0
  87. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/utilities/_position.scss +36 -0
  88. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/utilities/_screenreaders.scss +11 -0
  89. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/utilities/_sizing.scss +12 -0
  90. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/utilities/_spacing.scss +51 -0
  91. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/utilities/_text.scss +52 -0
  92. data/app/assets/stylesheets/comfy/admin/cms/lib/bootstrap/utilities/_visibility.scss +11 -0
  93. data/app/controllers/comfy/admin/cms/files_controller.rb +3 -9
  94. data/app/controllers/comfy/admin/cms/layouts_controller.rb +3 -7
  95. data/app/controllers/comfy/admin/cms/pages_controller.rb +3 -7
  96. data/app/controllers/comfy/admin/cms/snippets_controller.rb +3 -7
  97. data/app/controllers/concerns/comfy/reorder_action.rb +17 -0
  98. data/app/views/comfy/admin/cms/files/_file.html.haml +1 -1
  99. data/app/views/comfy/admin/cms/layouts/_index_branch.html.haml +1 -1
  100. data/app/views/comfy/admin/cms/pages/_index_branch.html.haml +1 -1
  101. data/app/views/comfy/admin/cms/pages/toggle_branch.js.erb +1 -1
  102. data/app/views/comfy/admin/cms/snippets/index.html.haml +2 -2
  103. data/comfortable_mexican_sofa.gemspec +0 -2
  104. data/config/locales/ca.yml +263 -0
  105. data/config/locales/gr.yml +263 -0
  106. data/config/locales/tr.yml +20 -20
  107. data/lib/comfortable_mexican_sofa/configuration.rb +2 -0
  108. data/lib/comfortable_mexican_sofa/engine.rb +0 -2
  109. data/lib/comfortable_mexican_sofa/version.rb +1 -1
  110. data/test/controllers/comfy/admin/cms/files_controller_test.rb +7 -2
  111. data/test/controllers/comfy/admin/cms/layouts_controller_test.rb +23 -19
  112. data/test/controllers/comfy/admin/cms/pages_controller_test.rb +1 -1
  113. data/test/controllers/comfy/admin/cms/sites_controller_test.rb +2 -0
  114. data/test/controllers/comfy/admin/cms/snippets_controller_test.rb +3 -1
  115. metadata +92 -32
@@ -0,0 +1,13 @@
1
+ @mixin alert-variant($background, $border, $color) {
2
+ color: $color;
3
+ @include gradient-bg($background);
4
+ border-color: $border;
5
+
6
+ hr {
7
+ border-top-color: darken($border, 5%);
8
+ }
9
+
10
+ .alert-link {
11
+ color: darken($color, 10%);
12
+ }
13
+ }
@@ -0,0 +1,20 @@
1
+ // stylelint-disable declaration-no-important
2
+
3
+ // Contextual backgrounds
4
+
5
+ @mixin bg-variant($parent, $color) {
6
+ #{$parent} {
7
+ background-color: $color !important;
8
+ }
9
+ a#{$parent} {
10
+ @include hover-focus {
11
+ background-color: darken($color, 10%) !important;
12
+ }
13
+ }
14
+ }
15
+
16
+ @mixin bg-gradient-variant($parent, $color) {
17
+ #{$parent} {
18
+ background: $color linear-gradient(180deg, mix($body-bg, $color, 15%), $color) repeat-x !important;
19
+ }
20
+ }
@@ -0,0 +1,12 @@
1
+ @mixin badge-variant($bg) {
2
+ color: color-yiq($bg);
3
+ background-color: $bg;
4
+
5
+ &[href] {
6
+ @include hover-focus {
7
+ color: color-yiq($bg);
8
+ text-decoration: none;
9
+ background-color: darken($bg, 10%);
10
+ }
11
+ }
12
+ }
@@ -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-left-radius: $radius;
12
+ border-top-right-radius: $radius;
13
+ }
14
+ }
15
+
16
+ @mixin border-right-radius($radius) {
17
+ @if $enable-rounded {
18
+ border-top-right-radius: $radius;
19
+ border-bottom-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-top-left-radius: $radius;
33
+ border-bottom-left-radius: $radius;
34
+ }
35
+ }
@@ -0,0 +1,5 @@
1
+ @mixin box-shadow($shadow...) {
2
+ @if $enable-shadows {
3
+ box-shadow: $shadow;
4
+ }
5
+ }
@@ -0,0 +1,119 @@
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: 576px, md: 768px, lg: 992px, xl: 1200px)
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: 576px, md: 768px, lg: 992px, xl: 1200px))
14
+ // md
15
+ // >> breakpoint-next(sm, $breakpoint-names: (xs sm md lg xl))
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: 576px, md: 768px, lg: 992px, xl: 1200px))
25
+ // 576px
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: 576px, md: 768px, lg: 992px, xl: 1200px))
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
+ // Returns a blank string if smallest breakpoint, otherwise returns the name with a dash infront.
42
+ // Useful for making responsive utilities.
43
+ //
44
+ // >> breakpoint-infix(xs, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
45
+ // "" (Returns a blank string)
46
+ // >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
47
+ // "-sm"
48
+ @function breakpoint-infix($name, $breakpoints: $grid-breakpoints) {
49
+ @return if(breakpoint-min($name, $breakpoints) == null, "", "-#{$name}");
50
+ }
51
+
52
+ // Media of at least the minimum breakpoint width. No query for the smallest breakpoint.
53
+ // Makes the @content apply to the given breakpoint and wider.
54
+ @mixin media-breakpoint-up($name, $breakpoints: $grid-breakpoints) {
55
+ $min: breakpoint-min($name, $breakpoints);
56
+ @if $min {
57
+ @media (min-width: $min) {
58
+ @content;
59
+ }
60
+ } @else {
61
+ @content;
62
+ }
63
+ }
64
+
65
+ // Media of at most the maximum breakpoint width. No query for the largest breakpoint.
66
+ // Makes the @content apply to the given breakpoint and narrower.
67
+ @mixin media-breakpoint-down($name, $breakpoints: $grid-breakpoints) {
68
+ $max: breakpoint-max($name, $breakpoints);
69
+ @if $max {
70
+ @media (max-width: $max) {
71
+ @content;
72
+ }
73
+ } @else {
74
+ @content;
75
+ }
76
+ }
77
+
78
+ // Media that spans multiple breakpoint widths.
79
+ // Makes the @content apply between the min and max breakpoints
80
+ @mixin media-breakpoint-between($lower, $upper, $breakpoints: $grid-breakpoints) {
81
+ $min: breakpoint-min($lower, $breakpoints);
82
+ $max: breakpoint-max($upper, $breakpoints);
83
+
84
+ @if $min != null and $max != null {
85
+ @media (min-width: $min) and (max-width: $max) {
86
+ @content;
87
+ }
88
+ } @else if $max == null {
89
+ @include media-breakpoint-up($lower) {
90
+ @content;
91
+ }
92
+ } @else if $min == null {
93
+ @include media-breakpoint-down($upper) {
94
+ @content;
95
+ }
96
+ }
97
+ }
98
+
99
+ // Media between the breakpoint's minimum and maximum widths.
100
+ // No minimum for the smallest breakpoint, and no maximum for the largest one.
101
+ // Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.
102
+ @mixin media-breakpoint-only($name, $breakpoints: $grid-breakpoints) {
103
+ $min: breakpoint-min($name, $breakpoints);
104
+ $max: breakpoint-max($name, $breakpoints);
105
+
106
+ @if $min != null and $max != null {
107
+ @media (min-width: $min) and (max-width: $max) {
108
+ @content;
109
+ }
110
+ } @else if $max == null {
111
+ @include media-breakpoint-up($name) {
112
+ @content;
113
+ }
114
+ } @else if $min == null {
115
+ @include media-breakpoint-down($name) {
116
+ @content;
117
+ }
118
+ }
119
+ }
@@ -0,0 +1,94 @@
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($background, $border, $hover-background: darken($background, 7.5%), $hover-border: darken($border, 10%), $active-background: darken($background, 10%), $active-border: darken($border, 12.5%)) {
7
+ color: color-yiq($background);
8
+ @include gradient-bg($background);
9
+ border-color: $border;
10
+ @include box-shadow($btn-box-shadow);
11
+
12
+ @include hover {
13
+ color: color-yiq($hover-background);
14
+ @include gradient-bg($hover-background);
15
+ border-color: $hover-border;
16
+ }
17
+
18
+ &:focus,
19
+ &.focus {
20
+ // Avoid using mixin so we can pass custom focus shadow properly
21
+ @if $enable-shadows {
22
+ box-shadow: $btn-box-shadow, 0 0 0 $input-btn-focus-width rgba($border, .5);
23
+ } @else {
24
+ box-shadow: 0 0 0 $input-btn-focus-width rgba($border, .5);
25
+ }
26
+ }
27
+
28
+ // Disabled comes first so active can properly restyle
29
+ &.disabled,
30
+ &:disabled {
31
+ background-color: $background;
32
+ border-color: $border;
33
+ }
34
+
35
+ &:not([disabled]):not(.disabled):active,
36
+ &:not([disabled]):not(.disabled).active,
37
+ .show > &.dropdown-toggle {
38
+ color: color-yiq($active-background);
39
+ background-color: $active-background;
40
+ @if $enable-gradients {
41
+ background-image: none; // Remove the gradient for the pressed/active state
42
+ }
43
+ border-color: $active-border;
44
+
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);
50
+ }
51
+ }
52
+ }
53
+
54
+ @mixin button-outline-variant($color, $color-hover: #fff) {
55
+ color: $color;
56
+ background-color: transparent;
57
+ background-image: none;
58
+ border-color: $color;
59
+
60
+ @include hover {
61
+ color: $color-hover;
62
+ background-color: $color;
63
+ border-color: $color;
64
+ }
65
+
66
+ &:focus,
67
+ &.focus {
68
+ box-shadow: 0 0 0 $input-btn-focus-width rgba($color, .5);
69
+ }
70
+
71
+ &.disabled,
72
+ &:disabled {
73
+ color: $color;
74
+ background-color: transparent;
75
+ }
76
+
77
+ &:not([disabled]):not(.disabled):active,
78
+ &:not([disabled]):not(.disabled).active,
79
+ .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);
85
+ }
86
+ }
87
+
88
+ // Button sizes
89
+ @mixin button-size($padding-y, $padding-x, $font-size, $line-height, $border-radius) {
90
+ padding: $padding-y $padding-x;
91
+ font-size: $font-size;
92
+ line-height: $line-height;
93
+ @include border-radius($border-radius);
94
+ }
@@ -0,0 +1,35 @@
1
+ @mixin caret-down {
2
+ border-top: $caret-width solid;
3
+ border-right: $caret-width solid transparent;
4
+ border-bottom: 0;
5
+ border-left: $caret-width solid transparent;
6
+ }
7
+
8
+ @mixin caret-up {
9
+ border-top: 0;
10
+ border-right: $caret-width solid transparent;
11
+ border-bottom: $caret-width solid;
12
+ border-left: $caret-width solid transparent;
13
+ }
14
+
15
+ @mixin caret($direction: down) {
16
+ @if $enable-caret {
17
+ &::after {
18
+ display: inline-block;
19
+ width: 0;
20
+ height: 0;
21
+ margin-left: $caret-width * .85;
22
+ vertical-align: $caret-width * .85;
23
+ content: "";
24
+ @if $direction == down {
25
+ @include caret-down;
26
+ } @else if $direction == up {
27
+ @include caret-up;
28
+ }
29
+ }
30
+
31
+ &:empty::after {
32
+ margin-left: 0;
33
+ }
34
+ }
35
+ }
@@ -0,0 +1,7 @@
1
+ @mixin clearfix() {
2
+ &::after {
3
+ display: block;
4
+ clear: both;
5
+ content: "";
6
+ }
7
+ }
@@ -0,0 +1,11 @@
1
+ // stylelint-disable declaration-no-important
2
+
3
+ @mixin float-left {
4
+ float: left !important;
5
+ }
6
+ @mixin float-right {
7
+ float: right !important;
8
+ }
9
+ @mixin float-none {
10
+ float: none !important;
11
+ }
@@ -0,0 +1,108 @@
1
+ // Form control focus state
2
+ //
3
+ // Generate a customized focus state and for any input with the specified color,
4
+ // which defaults to the `$input-focus-border-color` variable.
5
+ //
6
+ // We highly encourage you to not customize the default value, but instead use
7
+ // this to tweak colors on an as-needed basis. This aesthetic change is based on
8
+ // WebKit's default styles, but applicable to a wider range of browsers. Its
9
+ // usability and accessibility should be taken into account with any change.
10
+ //
11
+ // Example usage: change the default blue border and shadow to white for better
12
+ // contrast against a dark gray background.
13
+ @mixin form-control-focus() {
14
+ &:focus {
15
+ color: $input-focus-color;
16
+ background-color: $input-focus-bg;
17
+ border-color: $input-focus-border-color;
18
+ outline: none;
19
+ // Avoid using mixin so we can pass custom focus shadow properly
20
+ @if $enable-shadows {
21
+ box-shadow: $input-box-shadow, $input-btn-focus-box-shadow;
22
+ } @else {
23
+ box-shadow: $input-btn-focus-box-shadow;
24
+ }
25
+ }
26
+ }
27
+
28
+
29
+ @mixin form-validation-state($state, $color) {
30
+
31
+ .#{$state}-feedback {
32
+ display: none;
33
+ margin-top: .25rem;
34
+ font-size: .875rem;
35
+ color: $color;
36
+ }
37
+
38
+ .#{$state}-tooltip {
39
+ position: absolute;
40
+ top: 100%;
41
+ z-index: 5;
42
+ display: none;
43
+ width: 250px;
44
+ padding: .5rem;
45
+ margin-top: .1rem;
46
+ font-size: .875rem;
47
+ line-height: 1;
48
+ color: #fff;
49
+ background-color: rgba($color,.8);
50
+ border-radius: .2rem;
51
+ }
52
+
53
+ .form-control,
54
+ .custom-select {
55
+ .was-validated &:#{$state},
56
+ &.is-#{$state} {
57
+ border-color: $color;
58
+
59
+ &:focus {
60
+ box-shadow: 0 0 0 .2rem rgba($color,.25);
61
+ }
62
+
63
+ ~ .#{$state}-feedback,
64
+ ~ .#{$state}-tooltip {
65
+ display: block;
66
+ }
67
+ }
68
+ }
69
+
70
+
71
+ // TODO: redo check markup lol crap
72
+ .form-check-input {
73
+ .was-validated &:#{$state},
74
+ &.is-#{$state} {
75
+ + .form-check-label {
76
+ color: $color;
77
+ }
78
+ }
79
+ }
80
+
81
+ // custom radios and checks
82
+ .custom-control-input {
83
+ .was-validated &:#{$state},
84
+ &.is-#{$state} {
85
+ ~ .custom-control-indicator {
86
+ background-color: rgba($color, .25);
87
+ }
88
+ ~ .custom-control-description {
89
+ color: $color;
90
+ }
91
+ }
92
+ }
93
+
94
+ // custom file
95
+ .custom-file-input {
96
+ .was-validated &:#{$state},
97
+ &.is-#{$state} {
98
+ ~ .custom-file-control {
99
+ border-color: $color;
100
+
101
+ &::before { border-color: inherit; }
102
+ }
103
+ &:focus {
104
+ box-shadow: 0 0 0 .2rem rgba($color,.25);
105
+ }
106
+ }
107
+ }
108
+ }