material-sass 1.4.1 → 4.0.0.alpha5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (189) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/Rakefile +61 -0
  4. data/app/assets/fonts/{MaterialIcons-Regular.eot → material-icons/MaterialIcons-Regular.eot} +0 -0
  5. data/app/assets/fonts/{MaterialIcons-Regular.ijmap → material-icons/MaterialIcons-Regular.ijmap} +0 -0
  6. data/app/assets/fonts/{MaterialIcons-Regular.svg → material-icons/MaterialIcons-Regular.svg} +0 -0
  7. data/app/assets/fonts/{MaterialIcons-Regular.ttf → material-icons/MaterialIcons-Regular.ttf} +0 -0
  8. data/app/assets/fonts/{MaterialIcons-Regular.woff → material-icons/MaterialIcons-Regular.woff} +0 -0
  9. data/app/assets/fonts/{MaterialIcons-Regular.woff2 → material-icons/MaterialIcons-Regular.woff2} +0 -0
  10. data/app/assets/fonts/{README.md → material-icons/README.md} +0 -0
  11. data/app/assets/fonts/{codepoints → material-icons/codepoints} +0 -0
  12. data/app/assets/fonts/roboto/Roboto-Bold.eot +0 -0
  13. data/app/assets/fonts/roboto/Roboto-Bold.ttf +0 -0
  14. data/app/assets/fonts/roboto/Roboto-Bold.woff +0 -0
  15. data/app/assets/fonts/roboto/Roboto-Bold.woff2 +0 -0
  16. data/app/assets/fonts/roboto/Roboto-Light.eot +0 -0
  17. data/app/assets/fonts/roboto/Roboto-Light.ttf +0 -0
  18. data/app/assets/fonts/roboto/Roboto-Light.woff +0 -0
  19. data/app/assets/fonts/roboto/Roboto-Light.woff2 +0 -0
  20. data/app/assets/fonts/roboto/Roboto-Medium.eot +0 -0
  21. data/app/assets/fonts/roboto/Roboto-Medium.ttf +0 -0
  22. data/app/assets/fonts/roboto/Roboto-Medium.woff +0 -0
  23. data/app/assets/fonts/roboto/Roboto-Medium.woff2 +0 -0
  24. data/app/assets/fonts/roboto/Roboto-Regular.eot +0 -0
  25. data/app/assets/fonts/roboto/Roboto-Regular.ttf +0 -0
  26. data/app/assets/fonts/roboto/Roboto-Regular.woff +0 -0
  27. data/app/assets/fonts/roboto/Roboto-Regular.woff2 +0 -0
  28. data/app/assets/fonts/roboto/Roboto-Thin.eot +0 -0
  29. data/app/assets/fonts/roboto/Roboto-Thin.ttf +0 -0
  30. data/app/assets/fonts/roboto/Roboto-Thin.woff +0 -0
  31. data/app/assets/fonts/roboto/Roboto-Thin.woff2 +0 -0
  32. data/app/assets/javascripts/material.js +739 -798
  33. data/app/assets/javascripts/material/addons-materialise/pickadate.js +139 -0
  34. data/app/assets/javascripts/material/addons-materialise/textarea-autosize.js +9 -0
  35. data/app/assets/javascripts/material/addons-materialise/wave.js +12 -0
  36. data/app/assets/javascripts/material/addons/pickadate.js +7 -0
  37. data/app/assets/javascripts/material/addons/textarea-autosize.js +5 -0
  38. data/app/assets/javascripts/material/{wave.js → addons/wave.js} +0 -10
  39. data/app/assets/javascripts/material/src/floating-label.js +91 -0
  40. data/app/assets/javascripts/material/src/navdrawer.js +352 -0
  41. data/app/assets/javascripts/material/src/tab-switch.js +136 -0
  42. data/app/assets/javascripts/material/src/util.js +138 -0
  43. data/app/assets/stylesheets/material.min.css +2 -2
  44. data/app/assets/stylesheets/material.scss +1 -1
  45. data/app/assets/stylesheets/material/_mixins.scss +21 -0
  46. data/app/assets/stylesheets/material/_utilities.scss +15 -0
  47. data/app/assets/stylesheets/material/_variables.scss +25 -0
  48. data/app/assets/stylesheets/material/base/_base.scss +482 -0
  49. data/app/assets/stylesheets/material/base/_grid.scss +28 -40
  50. data/app/assets/stylesheets/material/base/_typography.scss +208 -0
  51. data/app/assets/stylesheets/material/bootstrap/_alert.scss +55 -0
  52. data/app/assets/stylesheets/material/bootstrap/_animation.scss +26 -0
  53. data/app/assets/stylesheets/material/bootstrap/_breadcrumb.scss +39 -0
  54. data/app/assets/stylesheets/material/bootstrap/_button-group.scss +155 -0
  55. data/app/assets/stylesheets/material/bootstrap/_carousel.scss +234 -0
  56. data/app/assets/stylesheets/material/bootstrap/_close.scss +31 -0
  57. data/app/assets/stylesheets/material/bootstrap/_code.scss +50 -0
  58. data/app/assets/stylesheets/material/bootstrap/_custom-form.scss +69 -0
  59. data/app/assets/stylesheets/material/bootstrap/_form.scss +116 -0
  60. data/app/assets/stylesheets/material/bootstrap/_image.scss +25 -0
  61. data/app/assets/stylesheets/material/bootstrap/_jumbotron.scss +12 -0
  62. data/app/assets/stylesheets/material/bootstrap/_media.scss +69 -0
  63. data/app/assets/stylesheets/material/bootstrap/_nav.scss +118 -0
  64. data/app/assets/stylesheets/material/bootstrap/_pagination.scss +68 -0
  65. data/app/assets/stylesheets/material/bootstrap/_popover.scss +84 -0
  66. data/app/assets/stylesheets/material/bootstrap/_responsive-embed.scss +37 -0
  67. data/app/assets/stylesheets/material/material.scss +62 -0
  68. data/app/assets/stylesheets/material/material/_button-flat.scss +53 -0
  69. data/app/assets/stylesheets/material/material/_button-float.scss +29 -0
  70. data/app/assets/stylesheets/material/material/_button.scss +241 -0
  71. data/app/assets/stylesheets/material/material/_card.scss +286 -0
  72. data/app/assets/stylesheets/material/material/_chip.scss +93 -0
  73. data/app/assets/stylesheets/material/material/_data-table.scss +138 -0
  74. data/app/assets/stylesheets/material/material/_dialog.scss +147 -0
  75. data/app/assets/stylesheets/material/material/_expansion-panel.scss +292 -0
  76. data/app/assets/stylesheets/material/material/_menu.scss +281 -0
  77. data/app/assets/stylesheets/material/material/_navdrawer.scss +289 -0
  78. data/app/assets/stylesheets/material/material/_picker.scss +272 -0
  79. data/app/assets/stylesheets/material/material/_progress-circular.scss +144 -0
  80. data/app/assets/stylesheets/material/material/_progress.scss +174 -0
  81. data/app/assets/stylesheets/material/material/_selection-control.scss +221 -0
  82. data/app/assets/stylesheets/material/material/_stepper.scss +135 -0
  83. data/app/assets/stylesheets/material/material/_tab.scss +196 -0
  84. data/app/assets/stylesheets/material/material/_text-field-floating-label.scss +51 -0
  85. data/app/assets/stylesheets/material/material/_text-field-input-group.scss +76 -0
  86. data/app/assets/stylesheets/material/material/_text-field-textarea.scss +31 -0
  87. data/app/assets/stylesheets/material/material/_text-field.scss +179 -0
  88. data/app/assets/stylesheets/material/material/_toolbar.scss +516 -0
  89. data/app/assets/stylesheets/material/material/_tooltip.scss +86 -0
  90. data/app/assets/stylesheets/material/mixins/_background-variant.scss +14 -0
  91. data/app/assets/stylesheets/material/mixins/_border-radius.scss +34 -0
  92. data/app/assets/stylesheets/material/mixins/_breakpoint.scss +38 -0
  93. data/app/assets/stylesheets/material/mixins/_clearfix.scss +7 -0
  94. data/app/assets/stylesheets/material/mixins/_form.scss +60 -0
  95. data/app/assets/stylesheets/material/mixins/_grid.scss +149 -0
  96. data/app/assets/stylesheets/material/mixins/_hex-to-rgba.scss +3 -0
  97. data/app/assets/stylesheets/material/mixins/_hover.scss +70 -0
  98. data/app/assets/stylesheets/material/mixins/_image.scss +4 -0
  99. data/app/assets/stylesheets/material/mixins/_list.scss +4 -0
  100. data/app/assets/stylesheets/material/mixins/_nav-divider.scss +6 -0
  101. data/app/assets/stylesheets/material/mixins/_pull.scss +7 -0
  102. data/app/assets/stylesheets/material/mixins/_reset-text.scss +35 -0
  103. data/app/assets/stylesheets/material/mixins/_screenreader.scss +23 -0
  104. data/app/assets/stylesheets/material/mixins/_strip-unit.scss +3 -0
  105. data/app/assets/stylesheets/material/mixins/_tab-focus.scss +5 -0
  106. data/app/assets/stylesheets/material/mixins/_text-emphasis.scss +14 -0
  107. data/app/assets/stylesheets/material/mixins/_text-hide.scss +7 -0
  108. data/app/assets/stylesheets/material/mixins/_text-truncate.scss +5 -0
  109. data/app/assets/stylesheets/material/mixins/_transition.scss +55 -0
  110. data/app/assets/stylesheets/material/mixins/_typography.scss +69 -0
  111. data/app/assets/stylesheets/material/utilities/_align.scss +23 -0
  112. data/app/assets/stylesheets/material/utilities/_background.scss +23 -0
  113. data/app/assets/stylesheets/material/utilities/_border.scss +27 -0
  114. data/app/assets/stylesheets/material/utilities/_clearfix.scss +3 -0
  115. data/app/assets/stylesheets/material/utilities/_display.scss +11 -0
  116. data/app/assets/stylesheets/material/utilities/_float.scss +15 -0
  117. data/app/assets/stylesheets/material/utilities/_material-icons.scss +10 -0
  118. data/app/assets/stylesheets/material/utilities/_screenreader.scss +7 -0
  119. data/app/assets/stylesheets/material/utilities/_spacing.scss +65 -0
  120. data/app/assets/stylesheets/material/utilities/_text.scss +95 -0
  121. data/app/assets/stylesheets/material/utilities/_visibility.scss +50 -0
  122. data/app/assets/stylesheets/material/utilities/_waves.scss +48 -0
  123. data/app/assets/stylesheets/material/variables/_animation.scss +22 -0
  124. data/app/assets/stylesheets/material/variables/_colour.scss +389 -0
  125. data/app/assets/stylesheets/material/variables/_elevation-shadow.scss +84 -0
  126. data/app/assets/stylesheets/material/variables/_grid.scss +32 -0
  127. data/app/assets/stylesheets/material/variables/_spacer.scss +73 -0
  128. data/app/assets/stylesheets/material/variables/_typography.scss +72 -0
  129. data/app/assets/stylesheets/material/variables/_variable-bootstrap.scss +129 -0
  130. data/app/assets/stylesheets/material/variables/_variable-material.scss +434 -0
  131. data/lib/material-sass/engine.rb +3 -2
  132. data/lib/material-sass/version.rb +1 -1
  133. metadata +128 -70
  134. data/app/assets/javascripts/material.min.js +0 -2
  135. data/app/assets/javascripts/material/_.js +0 -6
  136. data/app/assets/javascripts/material/bootstrap.js +0 -6
  137. data/app/assets/javascripts/material/form-floating-label.js +0 -49
  138. data/app/assets/javascripts/material/form-textarea.js +0 -13
  139. data/app/assets/javascripts/material/header.js +0 -12
  140. data/app/assets/javascripts/material/menu.js +0 -200
  141. data/app/assets/javascripts/material/modal.js +0 -12
  142. data/app/assets/javascripts/material/picker.js +0 -141
  143. data/app/assets/javascripts/material/snackbar.js +0 -116
  144. data/app/assets/javascripts/material/tab.js +0 -51
  145. data/app/assets/javascripts/material/tile.js +0 -181
  146. data/app/assets/stylesheets/material/addons/_material-icons.scss +0 -9
  147. data/app/assets/stylesheets/material/addons/_waves.scss +0 -44
  148. data/app/assets/stylesheets/material/addons/material-icons/_core.scss +0 -20
  149. data/app/assets/stylesheets/material/addons/material-icons/_larger.scss +0 -23
  150. data/app/assets/stylesheets/material/addons/material-icons/_path.scss +0 -11
  151. data/app/assets/stylesheets/material/addons/material-icons/_variables.scss +0 -3
  152. data/app/assets/stylesheets/material/base.scss +0 -50
  153. data/app/assets/stylesheets/material/base/_reset.scss +0 -421
  154. data/app/assets/stylesheets/material/components/_avatar.scss +0 -59
  155. data/app/assets/stylesheets/material/components/_breadcrumb.scss +0 -26
  156. data/app/assets/stylesheets/material/components/_button-flat.scss +0 -22
  157. data/app/assets/stylesheets/material/components/_button-float.scss +0 -183
  158. data/app/assets/stylesheets/material/components/_button.scss +0 -81
  159. data/app/assets/stylesheets/material/components/_card.scss +0 -175
  160. data/app/assets/stylesheets/material/components/_code.scss +0 -53
  161. data/app/assets/stylesheets/material/components/_dropdown.scss +0 -99
  162. data/app/assets/stylesheets/material/components/_form-checkbox.scss +0 -161
  163. data/app/assets/stylesheets/material/components/_form-floating-label.scss +0 -64
  164. data/app/assets/stylesheets/material/components/_form-switch.scss +0 -96
  165. data/app/assets/stylesheets/material/components/_form-textarea.scss +0 -4
  166. data/app/assets/stylesheets/material/components/_form.scss +0 -217
  167. data/app/assets/stylesheets/material/components/_label.scss +0 -23
  168. data/app/assets/stylesheets/material/components/_modal.scss +0 -164
  169. data/app/assets/stylesheets/material/components/_nav.scss +0 -53
  170. data/app/assets/stylesheets/material/components/_picker.scss +0 -298
  171. data/app/assets/stylesheets/material/components/_progress-circular.scss +0 -169
  172. data/app/assets/stylesheets/material/components/_progress-loadbar.scss +0 -97
  173. data/app/assets/stylesheets/material/components/_progress.scss +0 -132
  174. data/app/assets/stylesheets/material/components/_snackbar.scss +0 -59
  175. data/app/assets/stylesheets/material/components/_stepper.scss +0 -201
  176. data/app/assets/stylesheets/material/components/_tab.scss +0 -84
  177. data/app/assets/stylesheets/material/components/_table.scss +0 -82
  178. data/app/assets/stylesheets/material/components/_tile.scss +0 -156
  179. data/app/assets/stylesheets/material/elements/_content.scss +0 -42
  180. data/app/assets/stylesheets/material/elements/_header.scss +0 -141
  181. data/app/assets/stylesheets/material/elements/_menu.scss +0 -267
  182. data/app/assets/stylesheets/material/mixin/_grid.scss +0 -78
  183. data/app/assets/stylesheets/material/mixin/_responsive.scss +0 -32
  184. data/app/assets/stylesheets/material/mixin/_utilities.scss +0 -69
  185. data/app/assets/stylesheets/material/utilities/_print.scss +0 -95
  186. data/app/assets/stylesheets/material/utilities/_utilities-responsive.scss +0 -97
  187. data/app/assets/stylesheets/material/utilities/_utilities.scss +0 -393
  188. data/app/assets/stylesheets/material/var/_colours.scss +0 -336
  189. data/app/assets/stylesheets/material/var/_variables.scss +0 -78
@@ -0,0 +1,86 @@
1
+ .tooltip {
2
+ display: block;
3
+ font-size: $tooltip-font-size;
4
+ position: absolute;
5
+ z-index: $tooltip-zindex;
6
+ @include reset-text;
7
+
8
+ &.bs-tether-element-attached-bottom,
9
+ &.tooltip-top {
10
+ margin-top: ($tooltip-margin * -1);
11
+ }
12
+
13
+ &.bs-tether-element-attached-left,
14
+ &.tooltip-right {
15
+ margin-left: $tooltip-margin;
16
+ }
17
+
18
+ &.bs-tether-element-attached-right,
19
+ &.tooltip-left {
20
+ margin-left: ($tooltip-margin * -1);
21
+ }
22
+
23
+ &.bs-tether-element-attached-top,
24
+ &.tooltip-bottom {
25
+ margin-top: $tooltip-margin;
26
+ }
27
+
28
+ &.fade {
29
+ opacity: 0;
30
+ transition-property: opacity;
31
+
32
+ .tooltip-inner {
33
+ transform: scale(0.87);
34
+ @include transition-acceleration(transform);
35
+ }
36
+ }
37
+
38
+ &.fade.in {
39
+ opacity: $tooltip-opacity;
40
+ transition-property: opacity;
41
+
42
+ .tooltip-inner {
43
+ transform: scale(1);
44
+ @include transition-deceleration(transform);
45
+ }
46
+ }
47
+ }
48
+
49
+ .tooltip-inner {
50
+ background-color: $tooltip-bg;
51
+ color: $tooltip-color;
52
+ padding: $tooltip-padding-y $tooltip-padding-x;
53
+ text-align: center;
54
+ @include border-radius($border-radius);
55
+ }
56
+
57
+ // desktop
58
+ @include media-breakpoint-up(md) {
59
+ .tooltip {
60
+ font-size: $tooltip-font-size-md-up;
61
+
62
+ &.bs-tether-element-attached-bottom,
63
+ &.tooltip-top {
64
+ margin-top: ($tooltip-margin-md-up * -1);
65
+ }
66
+
67
+ &.bs-tether-element-attached-left,
68
+ &.tooltip-right {
69
+ margin-left: $tooltip-margin-md-up;
70
+ }
71
+
72
+ &.bs-tether-element-attached-right,
73
+ &.tooltip-left {
74
+ margin-left: ($tooltip-margin-md-up * -1);
75
+ }
76
+
77
+ &.bs-tether-element-attached-top,
78
+ &.tooltip-bottom {
79
+ margin-top: $tooltip-margin-md-up;
80
+ }
81
+ }
82
+
83
+ .tooltip-inner {
84
+ padding: $tooltip-padding-y-md-up $tooltip-padding-x-md-up;
85
+ }
86
+ }
@@ -0,0 +1,14 @@
1
+ @mixin bg-variant($class, $color, $color-dark: "") {
2
+ #{$class} {
3
+ background-color: $color !important;
4
+ }
5
+
6
+ @if ($color-dark != "") {
7
+ a#{$class} {
8
+ // active, focus, hover
9
+ @include active-focus-hover {
10
+ background-color: $color-dark !important;
11
+ }
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,34 @@
1
+ @mixin border-radius($radius: $border-radius) {
2
+ @if $enable-rounded {
3
+ border-radius: $radius;
4
+ }
5
+ }
6
+
7
+ // single side
8
+ @mixin border-top-radius($radius: $border-radius) {
9
+ @if $enable-rounded {
10
+ border-top-left-radius: $radius;
11
+ border-top-right-radius: $radius;
12
+ }
13
+ }
14
+
15
+ @mixin border-right-radius($radius: $border-radius) {
16
+ @if $enable-rounded {
17
+ border-top-right-radius: $radius;
18
+ border-bottom-right-radius: $radius;
19
+ }
20
+ }
21
+
22
+ @mixin border-bottom-radius($radius: $border-radius) {
23
+ @if $enable-rounded {
24
+ border-bottom-right-radius: $radius;
25
+ border-bottom-left-radius: $radius;
26
+ }
27
+ }
28
+
29
+ @mixin border-left-radius($radius: $border-radius) {
30
+ @if $enable-rounded {
31
+ border-bottom-left-radius: $radius;
32
+ border-top-left-radius: $radius;
33
+ }
34
+ }
@@ -0,0 +1,38 @@
1
+ @function breakpoint-max($name) {
2
+ $next: breakpoint-next($name);
3
+ @return if($next, breakpoint-min($next) - 1px, null);
4
+ }
5
+
6
+ @function breakpoint-min($name) {
7
+ $min: map-get($grid-breakpoints, $name);
8
+ @return if($min != 0, $min, null);
9
+ }
10
+
11
+ @function breakpoint-next($name, $names: map-keys($grid-breakpoints)) {
12
+ $n: index($names, $name);
13
+ @return if($n < length($names), nth($names, $n + 1), null);
14
+ }
15
+
16
+ @mixin media-breakpoint-down($name) {
17
+ $max: breakpoint-max($name);
18
+
19
+ @if $max {
20
+ @media (max-width: $max) {
21
+ @content;
22
+ }
23
+ } @else {
24
+ @content;
25
+ }
26
+ }
27
+
28
+ @mixin media-breakpoint-up($name) {
29
+ $min: breakpoint-min($name);
30
+
31
+ @if $min {
32
+ @media (min-width: $min) {
33
+ @content;
34
+ }
35
+ } @else {
36
+ @content
37
+ }
38
+ }
@@ -0,0 +1,7 @@
1
+ @mixin clearfix {
2
+ &::after {
3
+ clear: both;
4
+ content: "";
5
+ display: table;
6
+ }
7
+ }
@@ -0,0 +1,60 @@
1
+ @mixin floating-label-size($floating-label-height, $floating-label-padding-top, $font-size, $height, $line-height, $margin-bottom, $padding-top) {
2
+ $form-control-padding-top: ($floating-label-height - $floating-label-padding-top - $line-height - ($height - $padding-top - $line-height));
3
+
4
+ margin-bottom: $margin-bottom;
5
+ padding-top: $floating-label-padding-top;
6
+
7
+ > label {
8
+ font-size: $font-size;
9
+ line-height: $line-height;
10
+ // position
11
+ top: ($floating-label-padding-top + $form-control-padding-top);
12
+ }
13
+
14
+ &.has-value > label,
15
+ &.is-focused > label {
16
+ // position
17
+ top: $floating-label-padding-top;
18
+ transform: scale($floating-label-font-size-focus / $font-size);
19
+ }
20
+
21
+ > .form-control {
22
+ padding-top: $form-control-padding-top;
23
+ }
24
+
25
+ > select.form-control {
26
+ background-position: 100% ($form-control-padding-top + ($line-height - $material-icon-size / $font-size-root) / 2);
27
+ }
28
+ }
29
+
30
+ @mixin form-control-size($border-width, $font-size, $height, $line-height, $margin-bottom, $padding-top) {
31
+ font-size: $font-size;
32
+ line-height: $line-height;
33
+ margin-bottom: $margin-bottom;
34
+ padding: $padding-top 0 ($height - $padding-top - $line-height - $border-width / $font-size-root);
35
+
36
+ @if $border-width != 0px {
37
+ &:focus {
38
+ padding-bottom: ($height - $padding-top - $line-height - ($border-width + 1) / $font-size-root);
39
+ }
40
+ }
41
+ }
42
+
43
+ @mixin form-control-validation($color) {
44
+ .custom-control,
45
+ .form-check,
46
+ .form-control-feedback,
47
+ .form-control-label,
48
+ // &.checkbox label,
49
+ // &.checkbox-inline label,
50
+ &.form-check label,
51
+ &.form-check-inline label {
52
+ // &.radio label,
53
+ // &.radio-inline label {
54
+ color: $color;
55
+ }
56
+
57
+ .form-control {
58
+ border-bottom-color: $color;
59
+ }
60
+ }
@@ -0,0 +1,149 @@
1
+ //
2
+ // make column
3
+ //
4
+ @mixin make-grid-columns() {
5
+ %grid-column {
6
+ min-height: 1px;
7
+ position: relative;
8
+ @include make-gutters;
9
+
10
+ @if $enable-flex {
11
+ width: 100%;
12
+ }
13
+ }
14
+
15
+ $breakpoint-counter: 0;
16
+
17
+ @each $breakpoint in map-keys($grid-breakpoints) {
18
+ $breakpoint-counter: ($breakpoint-counter + 1);
19
+
20
+ .col-#{$breakpoint} {
21
+ @extend %grid-column;
22
+ }
23
+
24
+ @for $i from 1 through $grid-columns {
25
+ .col-#{$breakpoint}-#{$i} {
26
+ @extend %grid-column;
27
+ }
28
+ }
29
+
30
+ @include media-breakpoint-up($breakpoint) {
31
+ @if $enable-flex {
32
+ .col-#{$breakpoint} {
33
+ flex-basis: 0;
34
+ flex-grow: 1;
35
+ max-width: 100%;
36
+ }
37
+ }
38
+
39
+ @for $i from 1 through $grid-columns {
40
+ .col-#{$breakpoint}-#{$i} {
41
+ @include make-col($i);
42
+ }
43
+ }
44
+
45
+ @each $modifier in (pull, push) {
46
+ @for $i from 0 through $grid-columns {
47
+ .#{$modifier}-#{$breakpoint}-#{$i} {
48
+ @include make-col-modifier($i, $modifier);
49
+ }
50
+ }
51
+ }
52
+
53
+ @for $i from 0 through ($grid-columns - 1) {
54
+ @if $breakpoint-counter != 1 or $i != 0 {
55
+ .offset-#{$breakpoint}-#{$i} {
56
+ @include make-col-modifier($i, offset);
57
+ }
58
+ }
59
+ }
60
+ }
61
+ }
62
+ }
63
+
64
+ // col
65
+ @mixin make-col($size) {
66
+ @if $enable-flex {
67
+ flex: 0 0 percentage($size / $grid-columns);
68
+ max-width: percentage($size / $grid-columns);
69
+ } @else {
70
+ float: left;
71
+ width: percentage($size / $grid-columns);
72
+ }
73
+ }
74
+
75
+ // gutter
76
+ @mixin make-gutters($type: padding) {
77
+ @each $breakpoint in map-keys($grid-gutter-widths) {
78
+ @include media-breakpoint-up($breakpoint) {
79
+ $gutter: map-get($grid-gutter-widths, $breakpoint);
80
+
81
+ @if ($type == margin) {
82
+ margin-right: ($gutter / -2);
83
+ margin-left: ($gutter / -2);
84
+ } @else if ($type == padding) {
85
+ padding-right: ($gutter / 2);
86
+ padding-left: ($gutter / 2);
87
+ }
88
+ }
89
+ }
90
+ }
91
+
92
+ // modifier
93
+ @mixin make-col-modifier($size, $type) {
94
+ @if ($type == offset) {
95
+ @include make-col-offset($size);
96
+ } @else if ($type == pull) {
97
+ @include make-col-pull($size);
98
+ } @else if ($type == push ){
99
+ @include make-col-push($size);
100
+ }
101
+ }
102
+
103
+ @mixin make-col-offset($size) {
104
+ margin-left: percentage($size / $grid-columns);
105
+ }
106
+
107
+ @mixin make-col-pull($size) {
108
+ right: if($size > 0, percentage($size / $grid-columns), auto);
109
+ }
110
+
111
+ @mixin make-col-push($size) {
112
+ left: if($size > 0, percentage($size / $grid-columns), auto);
113
+ }
114
+
115
+ //
116
+ // make container
117
+ //
118
+ @mixin make-container() {
119
+ margin-right: auto;
120
+ margin-left: auto;
121
+ @include make-gutters;
122
+
123
+ @if not $enable-flex {
124
+ @include clearfix;
125
+ }
126
+ }
127
+
128
+ @mixin make-container-max-widths() {
129
+ @each $breakpoint, $container-max-width in $container-max-widths {
130
+ @include media-breakpoint-up($breakpoint) {
131
+ max-width: 100%;
132
+ width: $container-max-width;
133
+ }
134
+ }
135
+ }
136
+
137
+ //
138
+ // make row
139
+ //
140
+ @mixin make-row() {
141
+ @include make-gutters(margin);
142
+
143
+ @if $enable-flex {
144
+ display: flex;
145
+ flex-wrap: wrap;
146
+ } @else {
147
+ @include clearfix;
148
+ }
149
+ }
@@ -0,0 +1,3 @@
1
+ @function hex-to-rgba($color, $opacity) {
2
+ @return rgba(red($color), green($color), blue($color), $opacity);
3
+ }
@@ -0,0 +1,70 @@
1
+ @mixin active-focus-hover {
2
+ @if $enable-hover-media-query {
3
+ &:active,
4
+ &:focus {
5
+ @content
6
+ }
7
+
8
+ @include hover {
9
+ @content
10
+ }
11
+ } @else {
12
+ &:active,
13
+ &:focus,
14
+ &:hover {
15
+ @content
16
+ }
17
+ }
18
+ }
19
+
20
+ @mixin focus-hover {
21
+ @if $enable-hover-media-query {
22
+ &:focus {
23
+ @content
24
+ }
25
+
26
+ @include hover {
27
+ @content
28
+ }
29
+ } @else {
30
+ &:focus,
31
+ &:hover {
32
+ @content
33
+ }
34
+ }
35
+ }
36
+
37
+ @mixin hover {
38
+ @if $enable-hover-media-query {
39
+ @media (hover: hover) {
40
+ &:hover {
41
+ @content
42
+ }
43
+ }
44
+ } @else {
45
+ &:hover {
46
+ @content
47
+ }
48
+ }
49
+ }
50
+
51
+ @mixin plain-active-focus-hover {
52
+ @if $enable-hover-media-query {
53
+ &,
54
+ &:active,
55
+ &:focus {
56
+ @content
57
+ }
58
+
59
+ @include hover {
60
+ @content
61
+ }
62
+ } @else {
63
+ &,
64
+ &:active,
65
+ &:focus,
66
+ &:hover {
67
+ @content
68
+ }
69
+ }
70
+ }