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,53 @@
1
+ [class*="btn-flat"],
2
+ [class*="btn-outline"] {
3
+ background-color: transparent;
4
+ box-shadow: none;
5
+
6
+ // active, focus, hover
7
+ &:active,
8
+ &.active {
9
+ background-color: $btn-bg-active;
10
+ box-shadow: none;
11
+ }
12
+
13
+ // disabled
14
+ &:disabled,
15
+ &.disabled {
16
+ background-color: transparent;
17
+ }
18
+ }
19
+
20
+ // colour
21
+ .btn-flat-inverse,
22
+ .btn-outline-inverse {
23
+ @include plain-active-focus-hover {
24
+ color: $btn-color-inverse;
25
+ }
26
+
27
+ &::before {
28
+ background-color: $btn-flat-focus-overlay-inverse;
29
+ }
30
+
31
+ // active, focus, hover
32
+ &:active,
33
+ &.active {
34
+ background-color: $btn-bg-inverse-active;
35
+ }
36
+
37
+ // disabled
38
+ &:disabled,
39
+ &.disabled {
40
+ color: $btn-color-inverse-disabled;
41
+ }
42
+ }
43
+
44
+ @each $color in $palettes {
45
+ $i: index($palettes, $color);
46
+
47
+ .btn-flat-#{$color},
48
+ .btn-outline-#{$color} {
49
+ @include plain-active-focus-hover {
50
+ color: nth($palettes-color, $i);
51
+ }
52
+ }
53
+ }
@@ -0,0 +1,29 @@
1
+ .btn-float {
2
+ border-radius: 50%;
3
+ box-shadow: map-get($btn-float-elevation-shadow, shadow);
4
+ height: $btn-float-size;
5
+ line-height: $btn-float-size;
6
+ padding: 0;
7
+ position: relative;
8
+ min-width: 0;
9
+ width: $btn-float-size;
10
+ z-index: map-get($btn-float-elevation-shadow, elevation);
11
+
12
+ &::before {
13
+ border-radius: 50%;
14
+ }
15
+
16
+ // active, focus, hover
17
+ &:active,
18
+ &.active {
19
+ box-shadow: map-get($btn-float-elevation-shadow-active, shadow);
20
+ z-index: map-get($btn-float-elevation-shadow-active, elevation);
21
+ }
22
+ }
23
+
24
+ // size
25
+ .btn-float.btn-sm {
26
+ height: $btn-float-size-sm;
27
+ line-height: $btn-float-size-sm;
28
+ width: $btn-float-size-sm;
29
+ }
@@ -0,0 +1,241 @@
1
+ .btn {
2
+ background-color: $btn-bg;
3
+ background-image: none;
4
+ border: 0;
5
+ box-shadow: map-get($btn-elevation-shadow, shadow);
6
+ color: $btn-color;
7
+ cursor: pointer;
8
+ display: inline-block;
9
+ font-size: $btn-font-size;
10
+ font-weight: $btn-font-weight;
11
+ line-height: 1;
12
+ margin: 0;
13
+ max-width: 100%;
14
+ min-width: $btn-min-width;
15
+ padding: $btn-padding-y $btn-padding-x;
16
+ position: relative;
17
+ text-align: center;
18
+ text-transform: uppercase;
19
+ user-select: none;
20
+ vertical-align: middle;
21
+ white-space: nowrap;
22
+ z-index: map-get($btn-elevation-shadow, elevation);
23
+ @include border-radius($border-radius);
24
+ @include transition-standard(background-color, box-shadow, color);
25
+
26
+ &::before {
27
+ background-color: $btn-focus-overlay;
28
+ content: "";
29
+ display: block;
30
+ opacity: 0;
31
+ position: absolute;
32
+ top: 0;
33
+ right: 0;
34
+ bottom: 0;
35
+ left: 0;
36
+ z-index: -1;
37
+ @include border-radius($border-radius);
38
+ @include transition-standard(opacity);
39
+ }
40
+
41
+ // active, focus, hover
42
+ @include active-focus-hover {
43
+ color: $btn-color;
44
+
45
+ @if ($link-decoration-active != "none") {
46
+ text-decoration: none;
47
+ }
48
+ }
49
+
50
+ @include focus-hover {
51
+ &::before {
52
+ opacity: 1;
53
+ }
54
+ }
55
+
56
+ &:active,
57
+ &.active {
58
+ background-color: $btn-bg-active;
59
+ box-shadow: map-get($btn-elevation-shadow-active, shadow);
60
+ z-index: map-get($btn-elevation-shadow-active, elevation);
61
+
62
+ &::before {
63
+ opacity: 0;
64
+ }
65
+ }
66
+
67
+ &:focus {
68
+ outline: 0;
69
+ }
70
+
71
+ // disabled
72
+ &:disabled,
73
+ &.disabled {
74
+ background-color: $btn-bg-disabled;
75
+ box-shadow: none;
76
+ color: $btn-color-disabled;
77
+ cursor: $cursor-disabled;
78
+ opacity: 1;
79
+ pointer-events: none;
80
+
81
+ &::before,
82
+ .waves-ripple {
83
+ display: none;
84
+ }
85
+ }
86
+
87
+ // open
88
+ .open > &,
89
+ .open > & {
90
+ &.dropdown-toggle::before {
91
+ opacity: 1;
92
+ }
93
+ }
94
+
95
+ .dropdown.open > & {
96
+ &.dropdown-toggle,
97
+ &.dropdown-toggle::before {
98
+ @include border-bottom-radius(0);
99
+ }
100
+ }
101
+
102
+ .dropup.open > & {
103
+ &.dropdown-toggle,
104
+ &.dropdown-toggle::before {
105
+ @include border-top-radius(0);
106
+ }
107
+ }
108
+ }
109
+
110
+ // colour
111
+ .btn-inverse {
112
+ color: $btn-color-inverse;
113
+
114
+ // active, focus, hover
115
+ @include active-focus-hover {
116
+ color: $btn-color-inverse;
117
+ }
118
+
119
+ &:active,
120
+ &.active {
121
+ background-color: $btn-bg-inverse-active;
122
+ }
123
+
124
+ // disabled
125
+ &:disabled,
126
+ &.disabled {
127
+ background-color: $btn-bg-inverse-disabled;
128
+ color: $btn-color-inverse-disabled;
129
+ }
130
+ }
131
+
132
+ @each $color in $palettes {
133
+ $i: index($palettes, $color);
134
+
135
+ .btn-#{$color} {
136
+ background-color: nth($palettes-color, $i);
137
+ color: nth($palettes-text-color, $i);
138
+
139
+ // active, focus, hover
140
+ @include active-focus-hover {
141
+ color: nth($palettes-text-color, $i);
142
+ }
143
+
144
+ &:active,
145
+ &.active {
146
+ background-color: nth($palettes-color-dark, $i);
147
+ }
148
+
149
+ // disabled
150
+ &:disabled,
151
+ &.disabled {
152
+ background-color: $btn-bg-disabled;
153
+ color: $btn-color-disabled;
154
+ }
155
+ }
156
+ }
157
+
158
+ // size
159
+ .btn-lg {
160
+ font-size: $btn-font-size-lg;
161
+ padding: $btn-padding-y-lg $btn-padding-x-lg;
162
+ }
163
+
164
+ .btn-sm {
165
+ font-size: $btn-font-size-sm;
166
+ padding: $btn-padding-y-sm $btn-padding-x-sm;
167
+ }
168
+
169
+ //
170
+ // block button
171
+ //
172
+ .btn-block {
173
+ display: block;
174
+ width: 100%;
175
+
176
+ + .btn-block {
177
+ margin-top: $btn-block-spacer;
178
+ }
179
+ }
180
+
181
+ input[type="button"],
182
+ input[type="reset"],
183
+ input[type="submit"] {
184
+ &.btn-block {
185
+ width: 100%;
186
+ }
187
+ }
188
+
189
+ //
190
+ // link button
191
+ //
192
+ .btn-link {
193
+ background-color: transparent;
194
+ border-radius: 0;
195
+ box-shadow: none;
196
+ color: $link-color;
197
+ font-weight: normal;
198
+ text-decoration: $link-decoration;
199
+ text-transform: none;
200
+ z-index: initial;
201
+
202
+ &::before {
203
+ display: none;
204
+ }
205
+
206
+ // active, focus, hover
207
+ @include active-focus-hover {
208
+ color: $link-color-active;
209
+ text-decoration: $link-decoration-active;
210
+ }
211
+
212
+ &:active,
213
+ &.active {
214
+ background-color: transparent;
215
+ box-shadow: none;
216
+ z-index: initial;
217
+ }
218
+
219
+ &:focus {
220
+ @include tab-focus;
221
+ }
222
+
223
+ // disabled
224
+ &:disabled,
225
+ &.disabled {
226
+ background-color: transparent;
227
+ color: $btn-color-disabled;
228
+ outline: 0;
229
+
230
+ @if ($link-decoration-active != "none") {
231
+ text-decoration: none;
232
+ }
233
+ }
234
+ }
235
+
236
+ //
237
+ // no minimum width
238
+ //
239
+ .btn-fluid {
240
+ min-width: 0;
241
+ }
@@ -0,0 +1,286 @@
1
+ .card {
2
+ background-color: $card-bg;
3
+ border: 0;
4
+ box-shadow: map-get($card-elevation-shadow, shadow);
5
+ display: block;
6
+ margin-bottom: $card-margin-bottom;
7
+ position: relative;
8
+ @include border-radius($border-radius);
9
+ z-index: map-get($card-elevation-shadow, elevation);
10
+ }
11
+
12
+ .card[href]:not([tabindex]) {
13
+ // active, focus, hover
14
+ @include active-focus-hover {
15
+ @if ($link-decoration-active != "none") {
16
+ text-decoration: none;
17
+ }
18
+ }
19
+
20
+ &:active,
21
+ &.active {
22
+ box-shadow: map-get($card-elevation-shadow-active, shadow);
23
+ z-index: map-get($card-elevation-shadow-active, elevation);
24
+ }
25
+
26
+ &:focus {
27
+ box-shadow: map-get($card-elevation-shadow-active, shadow);
28
+ outline: 0;
29
+ }
30
+ }
31
+
32
+ // colour
33
+ .card-inverse {
34
+ background-color: $card-bg-inverse;
35
+ color: $card-color-inverse;
36
+ }
37
+
38
+ @each $color in $palettes {
39
+ $i: index($palettes, $color);
40
+
41
+ .card-#{$color} {
42
+ background-color: nth($palettes-color, $i);
43
+ color: nth($palettes-text-color, $i);
44
+ }
45
+ }
46
+
47
+ //
48
+ // action
49
+ //
50
+ .card-actions {
51
+ padding: $card-action-spacer-y $card-action-spacer-x;
52
+ @include clearfix;
53
+
54
+ &:first-child {
55
+ @include border-top-radius($border-radius);
56
+ }
57
+
58
+ &:last-child {
59
+ @include border-bottom-radius($border-radius);
60
+ }
61
+
62
+ .btn {
63
+ min-width: 0;
64
+ padding-right: $card-action-spacer-x;
65
+ padding-left: $card-action-spacer-x;
66
+
67
+ + .btn {
68
+ margin-left: $card-action-spacer-x;
69
+ }
70
+ }
71
+ }
72
+
73
+ .card-actions-bordered {
74
+ border-top: $card-border-width solid $card-border-color;
75
+ border-bottom: $card-border-width solid $card-border-color;
76
+
77
+ &:first-child {
78
+ border-top: 0;
79
+ }
80
+
81
+ &:last-child {
82
+ border-bottom: 0;
83
+ }
84
+ }
85
+
86
+ .card-actions-vertical {
87
+ align-items: flex-start;
88
+ display: flex;
89
+ flex-direction: column;
90
+
91
+ .btn + .btn,
92
+ .card-link + .card-link {
93
+ margin-top: $card-action-spacer-y;
94
+ margin-left: 0;
95
+ }
96
+ }
97
+
98
+ .card-link + .card-link {
99
+ margin-left: $card-action-spacer-x;
100
+ }
101
+
102
+ //
103
+ // block
104
+ //
105
+ .card-block {
106
+ padding: $card-spacer-inner-y $card-spacer-inner-x;
107
+ @include clearfix;
108
+
109
+ > :last-child {
110
+ margin-bottom: 0;
111
+ }
112
+ }
113
+
114
+ //
115
+ // footer
116
+ //
117
+ .card-footer {
118
+ border-top: $card-border-width solid $card-border-color;
119
+ padding: $card-spacer-inner-y $card-spacer-inner-x;
120
+
121
+ &:last-child {
122
+ @include border-bottom-radius($border-radius);
123
+ }
124
+ }
125
+
126
+ //
127
+ // header
128
+ //
129
+ .card-header {
130
+ border-bottom: $card-border-width solid $card-border-color;
131
+ margin-top: 0;
132
+ margin-bottom: 0;
133
+ padding: $card-spacer-inner-y $card-spacer-inner-x;
134
+ @include clearfix;
135
+
136
+ &:first-child {
137
+ @include border-top-radius($border-radius);
138
+ }
139
+
140
+ > :last-child {
141
+ margin-bottom: 0;
142
+ }
143
+ }
144
+
145
+ //
146
+ // image
147
+ //
148
+ .card-img {
149
+ @include border-radius($border-radius);
150
+ }
151
+
152
+ .card-img-bottom {
153
+ @include border-bottom-radius($border-radius);
154
+ }
155
+
156
+ .card-img-top {
157
+ @include border-top-radius($border-radius);
158
+ }
159
+
160
+ //
161
+ // image overlay
162
+ //
163
+ .card-img-overlay {
164
+ padding: $card-spacer-inner-y $card-spacer-inner-x;
165
+ position: absolute;
166
+ top: 0;
167
+ right: 0;
168
+ bottom: 0;
169
+ left: 0;
170
+ }
171
+
172
+ .card-img-overlay-body {
173
+ display: block;
174
+ }
175
+
176
+ .card-img-overlay-bottom {
177
+ @if $enable-flex {
178
+ display: flex;
179
+ flex-direction: column;
180
+ justify-content: flex-end;
181
+ } @else {
182
+ white-space: nowrap;
183
+
184
+ &::after {
185
+ content: "";
186
+ display: inline-block;
187
+ height: 100%;
188
+ width: 1px;
189
+ }
190
+
191
+ .card-img-overlay-body {
192
+ display: inline-block;
193
+ white-space: normal;
194
+ width: 100%;
195
+ }
196
+ }
197
+ }
198
+
199
+ //
200
+ // set
201
+ //
202
+ .card-columns {
203
+ margin-bottom: $card-margin-bottom;
204
+
205
+ .card {
206
+ margin-bottom: $card-spacer-outer-y;
207
+ }
208
+
209
+ @include media-breakpoint-up(sm) {
210
+ column-count: 2;
211
+ column-gap: 0;
212
+ margin-right: ($card-spacer-outer-x / -2);
213
+ margin-bottom: ($card-margin-bottom - $card-spacer-outer-y);
214
+ margin-left: ($card-spacer-outer-x / -2);
215
+
216
+ .card {
217
+ display: inline-block;
218
+ margin-right: ($card-spacer-outer-x / 2);
219
+ margin-left: ($card-spacer-outer-x / 2);
220
+ width: calc(100% - #{$card-spacer-outer-x});
221
+ }
222
+ }
223
+
224
+ @include media-breakpoint-up(md) {
225
+ column-count: 3;
226
+ }
227
+ }
228
+
229
+ .card-deck,
230
+ .card-group {
231
+ margin-bottom: $card-margin-bottom;
232
+
233
+ .card {
234
+ margin-bottom: $card-spacer-outer-y;
235
+ }
236
+ }
237
+
238
+ @if $enable-flex {
239
+ @include media-breakpoint-up(sm) {
240
+ }
241
+ } @else {
242
+ @include media-breakpoint-up(sm) {
243
+ .card-deck,
244
+ .card-group {
245
+ border-spacing: $card-spacer-outer-x 0;
246
+ display: table;
247
+ table-layout: fixed;
248
+ width: 100%;
249
+
250
+ .card {
251
+ display: table-cell;
252
+ margin-bottom: 0;
253
+ vertical-align: top;
254
+ }
255
+ }
256
+
257
+ .card-deck-wrapper,
258
+ .card-group-wrapper {
259
+ margin-right: ($card-spacer-outer-x * -1);
260
+ margin-left: ($card-spacer-outer-x * -1);
261
+ }
262
+ }
263
+ }
264
+
265
+ //
266
+ // text and title
267
+ //
268
+ .card-subtitle {
269
+ margin-top: ($card-spacer-inner-y / -2);
270
+ margin-bottom: 0;
271
+ @include typography-body-1;
272
+ }
273
+
274
+ .card-text:last-child {
275
+ margin-bottom: 0;
276
+ }
277
+
278
+ .card-title {
279
+ margin-top: $card-title-additonal-margin;
280
+ margin-bottom: $card-spacer-inner-y;
281
+ @include typography-headline;
282
+
283
+ &:only-child {
284
+ margin-top: 0;
285
+ }
286
+ }