material-sass 4.0.0.beta → 4.0.0.beta2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (162) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +2 -2
  3. data/Rakefile +12 -12
  4. data/{app/assets → assets}/javascripts/material-sprockets.js +0 -0
  5. data/{app/assets → assets}/javascripts/material.js +54 -4
  6. data/{app/assets → assets}/javascripts/material.min.js +1 -1
  7. data/{app/assets → assets}/javascripts/material/addons/picker.date.js +0 -0
  8. data/{app/assets → assets}/javascripts/material/addons/picker.js +0 -0
  9. data/{app/assets → assets}/javascripts/material/addons/textarea-autosize.js +0 -0
  10. data/{app/assets → assets}/javascripts/material/addons/waves.js +0 -0
  11. data/assets/javascripts/material/components/expansion-panel.js +50 -0
  12. data/{app/assets → assets}/javascripts/material/components/floating-label.js +1 -1
  13. data/{app/assets → assets}/javascripts/material/components/navdrawer.js +0 -0
  14. data/{app/assets → assets}/javascripts/material/components/selection-control-focus.js +2 -3
  15. data/{app/assets → assets}/javascripts/material/components/tab-switch.js +0 -0
  16. data/{app/assets → assets}/javascripts/material/components/util.js +0 -0
  17. data/{app/assets → assets}/javascripts/material/initializers/picker.js +0 -0
  18. data/{app/assets → assets}/javascripts/material/initializers/textarea-autosize.js +0 -0
  19. data/{app/assets → assets}/javascripts/material/initializers/waves.js +0 -0
  20. data/{app/assets → assets}/stylesheets/material.min.css +0 -0
  21. data/{app/assets → assets}/stylesheets/material.scss +0 -0
  22. data/{app/assets → assets}/stylesheets/material/_colours.scss +7 -11
  23. data/{app/assets → assets}/stylesheets/material/_functions.scss +8 -14
  24. data/{app/assets → assets}/stylesheets/material/_mixins.scss +1 -1
  25. data/{app/assets → assets}/stylesheets/material/_print.scss +4 -4
  26. data/{app/assets → assets}/stylesheets/material/_utilities.scss +0 -2
  27. data/{app/assets → assets}/stylesheets/material/_variables.scss +0 -2
  28. data/{app/assets → assets}/stylesheets/material/base/_base.scss +24 -49
  29. data/{app/assets → assets}/stylesheets/material/base/_grid.scss +1 -5
  30. data/{app/assets → assets}/stylesheets/material/base/_typography.scss +1 -11
  31. data/{app/assets → assets}/stylesheets/material/bootstrap/_alert.scss +14 -16
  32. data/{app/assets → assets}/stylesheets/material/bootstrap/_badge.scss +19 -7
  33. data/{app/assets → assets}/stylesheets/material/bootstrap/_breadcrumb.scss +0 -0
  34. data/{app/assets → assets}/stylesheets/material/bootstrap/_carousel.scss +0 -6
  35. data/{app/assets → assets}/stylesheets/material/bootstrap/_close.scss +0 -4
  36. data/{app/assets → assets}/stylesheets/material/bootstrap/_code.scss +0 -9
  37. data/{app/assets → assets}/stylesheets/material/bootstrap/_custom-form.scss +0 -0
  38. data/{app/assets → assets}/stylesheets/material/bootstrap/_form.scss +4 -16
  39. data/{app/assets → assets}/stylesheets/material/bootstrap/_image.scss +10 -14
  40. data/{app/assets → assets}/stylesheets/material/bootstrap/_jumbotron.scss +0 -0
  41. data/{app/assets → assets}/stylesheets/material/bootstrap/_media.scss +0 -0
  42. data/{app/assets → assets}/stylesheets/material/bootstrap/_nav.scss +4 -10
  43. data/{app/assets → assets}/stylesheets/material/bootstrap/_pagination.scss +0 -1
  44. data/{app/assets → assets}/stylesheets/material/bootstrap/_popover.scss +4 -10
  45. data/{app/assets → assets}/stylesheets/material/bootstrap/_responsive-embed.scss +0 -0
  46. data/{app/assets → assets}/stylesheets/material/bootstrap/_transition.scss +2 -0
  47. data/{app/assets → assets}/stylesheets/material/material.scss +1 -10
  48. data/{app/assets → assets}/stylesheets/material/material/_button-flat.scss +3 -2
  49. data/{app/assets → assets}/stylesheets/material/material/_button-float.scss +4 -4
  50. data/{app/assets → assets}/stylesheets/material/material/_button-group.scss +40 -95
  51. data/{app/assets → assets}/stylesheets/material/material/_button.scss +8 -24
  52. data/{app/assets → assets}/stylesheets/material/material/_card.scss +28 -48
  53. data/{app/assets → assets}/stylesheets/material/material/_chip.scss +3 -7
  54. data/{app/assets → assets}/stylesheets/material/material/_data-table.scss +40 -37
  55. data/{app/assets → assets}/stylesheets/material/material/_dialog.scss +79 -53
  56. data/assets/stylesheets/material/material/_expansion-panel.scss +247 -0
  57. data/{app/assets → assets}/stylesheets/material/material/_menu.scss +99 -96
  58. data/{app/assets → assets}/stylesheets/material/material/_navdrawer.scss +26 -54
  59. data/{app/assets → assets}/stylesheets/material/material/_picker.scss +8 -13
  60. data/{app/assets → assets}/stylesheets/material/material/_progress-circular.scss +0 -1
  61. data/{app/assets → assets}/stylesheets/material/material/_progress.scss +41 -53
  62. data/{app/assets → assets}/stylesheets/material/material/_selection-control.scss +4 -25
  63. data/{app/assets → assets}/stylesheets/material/material/_stepper.scss +1 -9
  64. data/{app/assets → assets}/stylesheets/material/material/_tab.scss +16 -16
  65. data/assets/stylesheets/material/material/_text-field-box.scss +59 -0
  66. data/{app/assets → assets}/stylesheets/material/material/_text-field-floating-label.scss +28 -13
  67. data/{app/assets → assets}/stylesheets/material/material/_text-field-input-group.scss +40 -49
  68. data/assets/stylesheets/material/material/_text-field-textarea.scss +15 -0
  69. data/{app/assets → assets}/stylesheets/material/material/_text-field.scss +23 -42
  70. data/{app/assets → assets}/stylesheets/material/material/_toolbar.scss +50 -37
  71. data/{app/assets → assets}/stylesheets/material/material/_tooltip.scss +6 -12
  72. data/{app/assets → assets}/stylesheets/material/mixins/_background-variant.scss +6 -5
  73. data/{app/assets → assets}/stylesheets/material/mixins/_border-radius.scss +2 -1
  74. data/{app/assets → assets}/stylesheets/material/mixins/_breakpoint.scss +7 -6
  75. data/{app/assets → assets}/stylesheets/material/mixins/_clearfix.scss +0 -0
  76. data/assets/stylesheets/material/mixins/_float.scss +13 -0
  77. data/{app/assets → assets}/stylesheets/material/mixins/_form.scss +37 -5
  78. data/{app/assets → assets}/stylesheets/material/mixins/_grid-framework.scss +30 -24
  79. data/{app/assets → assets}/stylesheets/material/mixins/_grid.scss +8 -8
  80. data/{app/assets → assets}/stylesheets/material/mixins/_hex-to-rgba.scss +0 -0
  81. data/{app/assets → assets}/stylesheets/material/mixins/_hover.scss +19 -19
  82. data/{app/assets → assets}/stylesheets/material/mixins/_image.scss +0 -0
  83. data/{app/assets → assets}/stylesheets/material/mixins/_list.scss +0 -0
  84. data/{app/assets → assets}/stylesheets/material/mixins/_material-icons.scss +4 -2
  85. data/{app/assets → assets}/stylesheets/material/mixins/_nav-divider.scss +0 -0
  86. data/{app/assets → assets}/stylesheets/material/mixins/_reset-text.scss +1 -1
  87. data/{app/assets → assets}/stylesheets/material/mixins/_screenreader.scss +1 -2
  88. data/{app/assets → assets}/stylesheets/material/mixins/_strip-unit.scss +0 -0
  89. data/{app/assets → assets}/stylesheets/material/mixins/_text-alignment.scss +0 -0
  90. data/{app/assets → assets}/stylesheets/material/mixins/_text-emphasis.scss +6 -5
  91. data/{app/assets → assets}/stylesheets/material/mixins/_text-hide.scss +0 -0
  92. data/{app/assets → assets}/stylesheets/material/mixins/_text-truncate.scss +0 -0
  93. data/{app/assets → assets}/stylesheets/material/mixins/_transition.scss +0 -8
  94. data/{app/assets → assets}/stylesheets/material/mixins/_typography.scss +0 -0
  95. data/{app/assets → assets}/stylesheets/material/utilities/_align.scss +2 -0
  96. data/{app/assets → assets}/stylesheets/material/utilities/_background.scss +0 -4
  97. data/{app/assets → assets}/stylesheets/material/utilities/_border.scss +2 -2
  98. data/{app/assets → assets}/stylesheets/material/utilities/_clearfix.scss +0 -0
  99. data/{app/assets → assets}/stylesheets/material/utilities/_display.scss +6 -2
  100. data/{app/assets → assets}/stylesheets/material/utilities/_flex.scss +10 -6
  101. data/{app/assets → assets}/stylesheets/material/utilities/_float.scss +3 -3
  102. data/{app/assets → assets}/stylesheets/material/utilities/_material-icons.scss +0 -0
  103. data/{app/assets → assets}/stylesheets/material/utilities/_position.scss +14 -0
  104. data/{app/assets → assets}/stylesheets/material/utilities/_screenreader.scss +0 -0
  105. data/{app/assets → assets}/stylesheets/material/utilities/_sizing.scss +2 -0
  106. data/{app/assets → assets}/stylesheets/material/utilities/_spacing.scss +32 -31
  107. data/{app/assets → assets}/stylesheets/material/utilities/_text.scss +2 -13
  108. data/{app/assets → assets}/stylesheets/material/utilities/_visibility.scss +2 -0
  109. data/{app/assets → assets}/stylesheets/material/utilities/_waves.scss +3 -3
  110. data/assets/stylesheets/material/variables/_elevation-shadow.scss +69 -0
  111. data/{app/assets → assets}/stylesheets/material/variables/_grid.scss +0 -4
  112. data/assets/stylesheets/material/variables/_palette.scss +66 -0
  113. data/{app/assets → assets}/stylesheets/material/variables/_spacer.scss +6 -11
  114. data/assets/stylesheets/material/variables/_transition.scss +27 -0
  115. data/{app/assets → assets}/stylesheets/material/variables/_typography.scss +21 -27
  116. data/{app/assets → assets}/stylesheets/material/variables/_variable-bootstrap.scss +22 -50
  117. data/{app/assets → assets}/stylesheets/material/variables/_variable-material.scss +108 -141
  118. data/lib/material-sass.rb +52 -4
  119. data/lib/material-sass/engine.rb +8 -8
  120. data/lib/material-sass/version.rb +1 -1
  121. data/material-sass.gemspec +3 -0
  122. metadata +145 -149
  123. data/app/assets/fonts/material-icons/MaterialIcons-Regular.eot +0 -0
  124. data/app/assets/fonts/material-icons/MaterialIcons-Regular.ijmap +0 -1
  125. data/app/assets/fonts/material-icons/MaterialIcons-Regular.svg +0 -2373
  126. data/app/assets/fonts/material-icons/MaterialIcons-Regular.ttf +0 -0
  127. data/app/assets/fonts/material-icons/MaterialIcons-Regular.woff +0 -0
  128. data/app/assets/fonts/material-icons/MaterialIcons-Regular.woff2 +0 -0
  129. data/app/assets/fonts/material-icons/README.md +0 -9
  130. data/app/assets/fonts/material-icons/codepoints +0 -932
  131. data/app/assets/fonts/roboto/Roboto-Bold.eot +0 -0
  132. data/app/assets/fonts/roboto/Roboto-Bold.ttf +0 -0
  133. data/app/assets/fonts/roboto/Roboto-Bold.woff +0 -0
  134. data/app/assets/fonts/roboto/Roboto-Bold.woff2 +0 -0
  135. data/app/assets/fonts/roboto/Roboto-Light.eot +0 -0
  136. data/app/assets/fonts/roboto/Roboto-Light.ttf +0 -0
  137. data/app/assets/fonts/roboto/Roboto-Light.woff +0 -0
  138. data/app/assets/fonts/roboto/Roboto-Light.woff2 +0 -0
  139. data/app/assets/fonts/roboto/Roboto-Medium.eot +0 -0
  140. data/app/assets/fonts/roboto/Roboto-Medium.ttf +0 -0
  141. data/app/assets/fonts/roboto/Roboto-Medium.woff +0 -0
  142. data/app/assets/fonts/roboto/Roboto-Medium.woff2 +0 -0
  143. data/app/assets/fonts/roboto/Roboto-Regular.eot +0 -0
  144. data/app/assets/fonts/roboto/Roboto-Regular.ttf +0 -0
  145. data/app/assets/fonts/roboto/Roboto-Regular.woff +0 -0
  146. data/app/assets/fonts/roboto/Roboto-Regular.woff2 +0 -0
  147. data/app/assets/fonts/roboto/Roboto-Thin.eot +0 -0
  148. data/app/assets/fonts/roboto/Roboto-Thin.ttf +0 -0
  149. data/app/assets/fonts/roboto/Roboto-Thin.woff +0 -0
  150. data/app/assets/fonts/roboto/Roboto-Thin.woff2 +0 -0
  151. data/app/assets/images/bg/amber.jpg +0 -0
  152. data/app/assets/images/bg/brand.jpg +0 -0
  153. data/app/assets/images/bg/green.jpg +0 -0
  154. data/app/assets/images/bg/purple.jpg +0 -0
  155. data/app/assets/images/bg/red.jpg +0 -0
  156. data/app/assets/images/bg/teal.jpg +0 -0
  157. data/app/assets/stylesheets/material/material/_expansion-panel.scss +0 -118
  158. data/app/assets/stylesheets/material/material/_text-field-textarea.scss +0 -18
  159. data/app/assets/stylesheets/material/mixins/_pull.scss +0 -7
  160. data/app/assets/stylesheets/material/variables/_elevation-shadow.scss +0 -91
  161. data/app/assets/stylesheets/material/variables/_palette.scss +0 -45
  162. data/app/assets/stylesheets/material/variables/_transition.scss +0 -29
@@ -1,3 +1,4 @@
1
+ [class*='btn-flat'],
1
2
  [class*='btn-outline'] {
2
3
  background-color: transparent;
3
4
  box-shadow: none;
@@ -13,8 +14,8 @@
13
14
  }
14
15
  }
15
16
 
16
- // Colour
17
17
  @each $color, $values in $theme-colors {
18
+ .btn-flat-#{$color},
18
19
  .btn-outline-#{$color} {
19
20
  @include plain-active-focus-hover {
20
21
  color: map-get(theme-color($color), color);
@@ -27,7 +28,7 @@
27
28
  }
28
29
  }
29
30
 
30
- [class*='bg-dark'] [class*='btn-outline'],
31
+ .btn-flat-light,
31
32
  .btn-outline-light {
32
33
  @include focus-hover {
33
34
  background-image: linear-gradient(to bottom, $btn-overlay-inverse, $btn-overlay-inverse);
@@ -7,13 +7,13 @@
7
7
  padding: 0;
8
8
  width: $btn-float-size;
9
9
 
10
- &:active,
11
- &.active {
10
+ &.active,
11
+ &:active {
12
12
  box-shadow: map-get($btn-float-elevation-shadow-active, shadow);
13
13
  }
14
14
 
15
- &:disabled,
16
- &.disabled {
15
+ &.disabled,
16
+ &:disabled {
17
17
  box-shadow: none;
18
18
  }
19
19
 
@@ -15,13 +15,23 @@
15
15
  flex: 0 1 auto;
16
16
  min-width: 0;
17
17
 
18
- &:active,
19
- &.active {
18
+ @each $color, $values in $theme-colors {
19
+ &-#{$color} {
20
+ &:disabled,
21
+ &.disabled {
22
+ background-color: map-get(theme-color($color), lighter);
23
+ color: color-yiq(map-get(theme-color($color), lighter));
24
+ }
25
+ }
26
+ }
27
+
28
+ &.active,
29
+ &:active {
20
30
  box-shadow: none;
21
31
  }
22
32
 
23
- &:disabled,
24
- &.disabled {
33
+ &.disabled,
34
+ &:disabled {
25
35
  opacity: $btn-group-toggle-opacity;
26
36
  }
27
37
 
@@ -40,20 +50,11 @@
40
50
  }
41
51
  }
42
52
 
43
- // Colour
44
- @each $color, $values in $theme-colors {
45
- > .btn-#{$color} {
46
- &:disabled,
47
- &.disabled {
48
- @include color-yiq(map-get(theme-color($color), lighter));
49
-
50
- background-color: map-get(theme-color($color), lighter);
51
- }
52
- }
53
- }
54
-
55
53
  > .btn-group,
56
54
  > .btn-group-vertical {
55
+ @include border-radius(0);
56
+
57
+ background-color: transparent;
57
58
  box-shadow: none;
58
59
  }
59
60
  }
@@ -63,40 +64,18 @@
63
64
  box-shadow: none;
64
65
  }
65
66
 
66
- // Border colour
67
- > .btn {
68
- border-left: $btn-group-inner-spacer-x solid transparent;
67
+ > .btn,
68
+ > .btn-group {
69
69
  margin-left: ($btn-group-inner-spacer-x * -1);
70
-
71
- &:disabled,
72
- &.disabled {
73
- + .btn:disabled,
74
- + .btn.disabled,
75
- + .btn-group > .btn:disabled:first-child,
76
- + .btn-group > .btn.disabled:first-child {
77
- border-left-color: $btn-group-divider-bg;
78
- }
79
- }
80
-
81
- &.active {
82
- + .btn.active,
83
- + .btn-group > .btn.active:first-child {
84
- border-left-color: $btn-group-divider-bg;
85
- }
86
- }
87
70
  }
88
71
 
89
- > .btn:first-child {
90
- border-left-width: 0;
72
+ > .btn:first-child,
73
+ > .btn-group:first-child {
91
74
  margin-left: 0;
92
75
  }
93
76
 
94
- > .btn-group > .btn:first-child {
95
- border-left-width: $btn-group-inner-spacer-x;
96
- margin-left: ($btn-group-inner-spacer-x * -1);
97
- }
98
-
99
77
  // Border radius
78
+
100
79
  > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
101
80
  @include border-right-radius(0);
102
81
  }
@@ -133,43 +112,18 @@
133
112
 
134
113
  > .btn,
135
114
  > .btn-group {
115
+ margin-top: ($btn-group-inner-spacer-y * -1);
116
+ margin-left: 0;
136
117
  width: 100%;
137
118
  }
138
119
 
139
- // Border colour
140
- > .btn {
141
- border-top: $btn-group-inner-spacer-x solid transparent;
142
- margin-top: ($btn-group-inner-spacer-x * -1);
143
-
144
- &:disabled,
145
- &.disabled {
146
- + .btn:disabled,
147
- + .btn.disabled,
148
- + .btn-group > .btn:disabled:first-child,
149
- + .btn-group > .btn.disabled:first-child {
150
- border-top-color: $btn-group-divider-bg;
151
- }
152
- }
153
-
154
- &.active {
155
- + .btn.active,
156
- + .btn-group > .btn.active:first-child {
157
- border-top-color: $btn-group-divider-bg;
158
- }
159
- }
160
- }
161
-
162
- > .btn:first-child {
163
- border-top-width: 0;
120
+ > .btn:first-child,
121
+ > .btn-group:first-child {
164
122
  margin-top: 0;
165
123
  }
166
124
 
167
- > .btn-group-vertical > .btn:first-child {
168
- border-top-width: $btn-group-inner-spacer-x;
169
- margin-top: ($btn-group-inner-spacer-x * -1);
170
- }
171
-
172
125
  // Border radius
126
+
173
127
  > .btn:first-child:not(:last-child) {
174
128
  @include border-bottom-radius(0);
175
129
  }
@@ -198,13 +152,11 @@
198
152
  }
199
153
  }
200
154
 
201
- // Fluid
202
155
  .btn-group-fluid {
203
156
  background-color: transparent;
204
157
  box-shadow: none;
205
158
  }
206
159
 
207
- // Size
208
160
  .btn-group-lg > .btn {
209
161
  @extend %btn-lg;
210
162
  }
@@ -213,13 +165,13 @@
213
165
  @extend %btn-sm;
214
166
  }
215
167
 
216
-
217
-
218
168
  // Checkbox and radio options
219
169
 
220
170
  [data-toggle='buttons'] {
221
171
  > .btn,
222
172
  > .btn-group > .btn {
173
+ margin-bottom: 0;
174
+
223
175
  [type='checkbox'],
224
176
  [type='radio'] {
225
177
  clip: rect(0, 0, 0, 0);
@@ -229,32 +181,25 @@
229
181
  }
230
182
  }
231
183
 
232
-
233
-
234
184
  // Split button dropdown
235
185
 
236
- .btn + .dropdown-toggle-split {
237
- padding-right: ($btn-padding-x / 2);
238
- padding-left: ($btn-padding-x / 2);
186
+ .dropdown-toggle.dropdown-toggle-split {
187
+ padding-right: $caret-spacer-x;
188
+ padding-left: $caret-spacer-x;
239
189
 
240
190
  &::after {
241
- margin-left: ($caret-spacer-x * -1);
191
+ margin-right: 0;
192
+ margin-left: 0;
242
193
  }
243
- }
244
194
 
245
- // Size
246
- .btn-lg + .dropdown-toggle-split {
247
- padding-right: ($btn-padding-x-lg / 2);
248
- padding-left: ($btn-padding-x-lg / 2);
249
- }
250
-
251
- .btn-sm + .dropdown-toggle-split {
252
- padding-right: ($btn-padding-x-sm / 2);
253
- padding-left: ($btn-padding-x-sm / 2);
195
+ .dropleft & {
196
+ &::before {
197
+ margin-right: 0;
198
+ margin-left: 0;
199
+ }
200
+ }
254
201
  }
255
202
 
256
-
257
-
258
203
  // Toolbar
259
204
 
260
205
  .btn-toolbar {
@@ -60,29 +60,20 @@
60
60
  }
61
61
  }
62
62
 
63
- a {
64
- &.btn.disabled {
65
- pointer-events: none;
66
- }
67
- }
68
-
69
- fieldset {
70
- &[disabled] a {
71
- &.btn {
72
- pointer-events: none;
73
- }
74
- }
63
+ // stylelint-disable selector-no-qualifying-type
64
+ a.btn.disabled,
65
+ fieldset[disabled] a.btn {
66
+ pointer-events: none;
75
67
  }
68
+ // stylelint-enable
76
69
 
77
- // Colour
78
70
  @each $color, $values in $theme-colors {
79
71
  .btn-#{$color} {
80
- @include color-yiq(map-get(theme-color($color), color));
81
-
82
72
  background-color: map-get(theme-color($color), color);
73
+ color: color-yiq(map-get(theme-color($color), color));
83
74
 
84
75
  @include active-focus-hover {
85
- @include color-yiq(map-get(theme-color($color), color));
76
+ color: color-yiq(map-get(theme-color($color), color));
86
77
  }
87
78
 
88
79
  &:active,
@@ -106,7 +97,6 @@ fieldset {
106
97
  }
107
98
  }
108
99
 
109
- // Size
110
100
  .btn-lg,
111
101
  %btn-lg {
112
102
  font-size: $btn-font-size-lg;
@@ -119,8 +109,6 @@ fieldset {
119
109
  padding: $btn-padding-y-sm $btn-padding-x-sm;
120
110
  }
121
111
 
122
-
123
-
124
112
  // Block button
125
113
 
126
114
  .btn-block {
@@ -140,8 +128,6 @@ fieldset {
140
128
  }
141
129
  }
142
130
 
143
-
144
-
145
131
  // Link button
146
132
 
147
133
  .btn-link {
@@ -149,7 +135,7 @@ fieldset {
149
135
  border-radius: 0;
150
136
  box-shadow: none;
151
137
  color: $link-color;
152
- font-weight: normal;
138
+ font-weight: $font-weight-regular;
153
139
  text-decoration: $link-decoration;
154
140
  text-transform: none;
155
141
 
@@ -176,8 +162,6 @@ fieldset {
176
162
  }
177
163
  }
178
164
 
179
-
180
-
181
165
  // No minimum width
182
166
 
183
167
  .btn-fluid {
@@ -10,22 +10,7 @@
10
10
  position: relative;
11
11
  word-wrap: break-word;
12
12
 
13
- &[href],
14
- &[tabindex] {
15
- @include active-focus-hover {
16
- box-shadow: map-get($card-elevation-shadow-hover, shadow);
17
- text-decoration: none;
18
- }
19
-
20
- &:focus {
21
- outline: 0;
22
- }
23
- }
24
- }
25
-
26
- // Colour
27
- @each $color, $values in $theme-colors {
28
- .card {
13
+ @each $color, $values in $theme-colors {
29
14
  &.border-#{$color} {
30
15
  box-shadow: map-get($card-elevation-shadow, shadow), inset 0 0 0 1px map-get(theme-color($color), color);
31
16
 
@@ -37,16 +22,26 @@
37
22
  }
38
23
  }
39
24
  }
40
- }
41
25
 
26
+ &[href],
27
+ &[tabindex] {
28
+ @include active-focus-hover {
29
+ box-shadow: map-get($card-elevation-shadow-hover, shadow);
30
+ text-decoration: none;
31
+ }
42
32
 
33
+ &:focus {
34
+ outline: 0;
35
+ }
36
+ }
37
+ }
43
38
 
44
39
  // Action
45
40
 
46
41
  .card-actions {
47
42
  align-items: flex-start;
48
43
  display: flex;
49
- padding: ($card-action-padding-y - $card-action-inner-spacer-y / 2) ($card-action-padding-x - $card-action-inner-spacer-x / 2);
44
+ padding: $card-action-padding-y ($card-action-padding-x - $card-action-inner-spacer-x) ($card-action-padding-y - $card-action-inner-spacer-y) $card-action-padding-x;
50
45
 
51
46
  &:first-child {
52
47
  @include border-top-radius($card-border-radius);
@@ -60,15 +55,14 @@
60
55
  @include text-truncate;
61
56
 
62
57
  flex: 0 1 auto;
63
- margin: ($card-action-inner-spacer-y / 2) ($card-action-inner-spacer-x / 2);
58
+ margin-right: $card-action-inner-spacer-x;
59
+ margin-bottom: $card-action-inner-spacer-y;
64
60
  min-width: 0;
65
61
  padding-right: $card-action-inner-spacer-x;
66
62
  padding-left: $card-action-inner-spacer-x;
67
63
  }
68
64
  }
69
65
 
70
-
71
-
72
66
  // Body
73
67
 
74
68
  .card-body {
@@ -106,8 +100,6 @@
106
100
  }
107
101
  }
108
102
 
109
-
110
-
111
103
  // Footer
112
104
 
113
105
  .card-footer {
@@ -131,13 +123,13 @@
131
123
 
132
124
  .card-body + &,
133
125
  .card-header + & {
134
- &:not[class*='border-'] {
135
- padding-top: 0;
136
- }
137
-
138
126
  &[class*='border-'] {
139
127
  margin-top: ($card-padding-y - $card-inner-spacer-y);
140
128
  }
129
+
130
+ &:not[class*='border-'] {
131
+ padding-top: 0;
132
+ }
141
133
  }
142
134
 
143
135
  .card-header[class*='border-'] + & {
@@ -151,8 +143,6 @@
151
143
  }
152
144
  }
153
145
 
154
-
155
-
156
146
  // Header
157
147
 
158
148
  .card-header {
@@ -165,6 +155,11 @@
165
155
  }
166
156
  }
167
157
 
158
+ &[class*='border-'] {
159
+ padding-top: $card-padding-y;
160
+ padding-bottom: $card-padding-y;
161
+ }
162
+
168
163
  &:first-child,
169
164
  .card-img-top + &,
170
165
  .list-group + & {
@@ -188,16 +183,11 @@
188
183
  margin-top: ($card-padding-y - $card-inner-spacer-y);
189
184
  }
190
185
  }
191
-
192
- &[class*='border-'] {
193
- padding-top: $card-padding-y;
194
- padding-bottom: $card-padding-y;
195
- }
196
186
  }
197
187
 
198
188
  .card-header-pills {
199
189
  margin: ($card-inner-spacer-y * -1) ($card-inner-spacer-x * -1) 0;
200
- padding: ($card-action-padding-y - $card-action-inner-spacer-y / 2) ($card-action-padding-x - $card-action-inner-spacer-x / 2);
190
+ padding: $card-action-padding-y ($card-action-padding-x - $card-action-inner-spacer-x) ($card-action-padding-y - $card-action-inner-spacer-y) $card-action-padding-x;
201
191
 
202
192
  .card-header:first-child &,
203
193
  .card-header[class*='border-'] &,
@@ -211,17 +201,15 @@
211
201
  }
212
202
 
213
203
  .nav-link {
214
- margin: ($card-action-inner-spacer-y / 2) ($card-action-inner-spacer-x / 2);
204
+ margin-right: $card-action-inner-spacer-x;
205
+ margin-bottom: $card-action-inner-spacer-y;
215
206
  padding-right: $card-action-inner-spacer-x;
216
207
  padding-left: $card-action-inner-spacer-x;
217
208
  }
218
209
  }
219
210
 
220
211
  .card-header-tabs {
221
- margin-top: ($card-inner-spacer-y * -1);
222
- margin-right: ($card-inner-spacer-x * -1);
223
- margin-bottom: ($card-padding-y - $card-inner-spacer-y);
224
- margin-left: ($card-inner-spacer-x * -1);
212
+ margin: ($card-inner-spacer-y * -1) ($card-inner-spacer-x * -1) ($card-padding-y - $card-inner-spacer-y);
225
213
 
226
214
  .card-header:first-child &,
227
215
  .card-header[class*='border-'] &,
@@ -236,8 +224,6 @@
236
224
  }
237
225
  }
238
226
 
239
-
240
-
241
227
  // Image
242
228
 
243
229
  .card-img {
@@ -252,8 +238,6 @@
252
238
  @include border-top-radius($card-border-radius);
253
239
  }
254
240
 
255
-
256
-
257
241
  // Image overlay
258
242
 
259
243
  .card-img-overlay {
@@ -265,8 +249,6 @@
265
249
  left: 0;
266
250
  }
267
251
 
268
-
269
-
270
252
  // Set
271
253
 
272
254
  .card-columns {
@@ -364,8 +346,6 @@
364
346
  }
365
347
  }
366
348
 
367
-
368
-
369
349
  // Text and title
370
350
 
371
351
  .card-link {