@oruga-ui/theme-oruga 0.2.2 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/README.md +6 -14
  2. package/dist/oruga.css +1894 -207
  3. package/dist/oruga.min.css +1 -1
  4. package/dist/scss/components/_autocomplete.scss +4 -49
  5. package/dist/scss/components/_button.scss +71 -88
  6. package/dist/scss/components/_carousel.scss +70 -97
  7. package/dist/scss/components/_checkbox.scss +66 -83
  8. package/dist/scss/components/_collapse.scss +3 -0
  9. package/dist/scss/components/_datepicker.scss +146 -242
  10. package/dist/scss/components/_datetimepicker.scss +3 -0
  11. package/dist/scss/components/_dropdown.scss +74 -160
  12. package/dist/scss/components/_field.scss +16 -38
  13. package/dist/scss/components/_icon.scss +6 -8
  14. package/dist/scss/components/_input.scss +50 -52
  15. package/dist/scss/components/_loading.scss +5 -13
  16. package/dist/scss/components/_menu.scss +33 -65
  17. package/dist/scss/components/_modal.scss +25 -34
  18. package/dist/scss/components/_notification.scss +35 -72
  19. package/dist/scss/components/_pagination.scss +43 -86
  20. package/dist/scss/components/_radio.scss +53 -60
  21. package/dist/scss/components/_select.scss +62 -74
  22. package/dist/scss/components/_sidebar.scss +31 -107
  23. package/dist/scss/components/_skeleton.scss +10 -23
  24. package/dist/scss/components/_slider.scss +67 -109
  25. package/dist/scss/components/_steps.scss +133 -310
  26. package/dist/scss/components/_switch.scss +64 -87
  27. package/dist/scss/components/_table.scss +79 -140
  28. package/dist/scss/components/_tabs.scss +101 -153
  29. package/dist/scss/components/_taginput.scss +61 -102
  30. package/dist/scss/components/_timepicker.scss +26 -50
  31. package/dist/scss/components/_tooltip.scss +120 -216
  32. package/dist/scss/components/_upload.scss +17 -22
  33. package/dist/scss/oruga-build.scss +9 -0
  34. package/dist/scss/oruga.scss +39 -190
  35. package/dist/scss/utils/_animations.scss +11 -9
  36. package/dist/scss/utils/_base.scss +4 -4
  37. package/dist/scss/utils/_helpers.scss +12 -106
  38. package/dist/scss/utils/_root.scss +46 -24
  39. package/dist/scss/utils/_variables.scss +6 -7
  40. package/dist/theme.js +1 -2
  41. package/package.json +30 -31
  42. package/src/assets/scss/components/_autocomplete.scss +4 -49
  43. package/src/assets/scss/components/_button.scss +71 -88
  44. package/src/assets/scss/components/_carousel.scss +70 -97
  45. package/src/assets/scss/components/_checkbox.scss +66 -83
  46. package/src/assets/scss/components/_collapse.scss +3 -0
  47. package/src/assets/scss/components/_datepicker.scss +146 -242
  48. package/src/assets/scss/components/_datetimepicker.scss +3 -0
  49. package/src/assets/scss/components/_dropdown.scss +74 -160
  50. package/src/assets/scss/components/_field.scss +16 -38
  51. package/src/assets/scss/components/_icon.scss +6 -8
  52. package/src/assets/scss/components/_input.scss +50 -52
  53. package/src/assets/scss/components/_loading.scss +5 -13
  54. package/src/assets/scss/components/_menu.scss +33 -65
  55. package/src/assets/scss/components/_modal.scss +25 -34
  56. package/src/assets/scss/components/_notification.scss +35 -72
  57. package/src/assets/scss/components/_pagination.scss +43 -86
  58. package/src/assets/scss/components/_radio.scss +53 -60
  59. package/src/assets/scss/components/_select.scss +62 -74
  60. package/src/assets/scss/components/_sidebar.scss +31 -107
  61. package/src/assets/scss/components/_skeleton.scss +10 -23
  62. package/src/assets/scss/components/_slider.scss +67 -109
  63. package/src/assets/scss/components/_steps.scss +133 -310
  64. package/src/assets/scss/components/_switch.scss +64 -87
  65. package/src/assets/scss/components/_table.scss +79 -140
  66. package/src/assets/scss/components/_tabs.scss +101 -153
  67. package/src/assets/scss/components/_taginput.scss +61 -102
  68. package/src/assets/scss/components/_timepicker.scss +26 -50
  69. package/src/assets/scss/components/_tooltip.scss +120 -216
  70. package/src/assets/scss/components/_upload.scss +17 -22
  71. package/src/assets/scss/oruga-build.scss +9 -0
  72. package/src/assets/scss/oruga.scss +39 -190
  73. package/src/assets/scss/utils/_animations.scss +11 -9
  74. package/src/assets/scss/utils/_base.scss +4 -4
  75. package/src/assets/scss/utils/_helpers.scss +12 -106
  76. package/src/assets/scss/utils/_root.scss +46 -24
  77. package/src/assets/scss/utils/_variables.scss +6 -7
  78. package/dist/oruga-full.css +0 -3922
  79. package/dist/oruga-full.min.css +0 -1
  80. package/dist/scss/oruga-common.scss +0 -37
  81. package/dist/scss/oruga-full.scss +0 -9
  82. package/src/assets/scss/oruga-common.scss +0 -37
  83. package/src/assets/scss/oruga-full.scss +0 -9
@@ -1,54 +1,60 @@
1
1
  @use "sass:list";
2
2
 
3
3
  /* @docs */
4
- $switch-active-background-color: $primary !default;
4
+ $switch-active-background-color: var(--#{$prefix}primary) !default;
5
5
  $switch-action-background: #f5f5f5 !default;
6
- $switch-background: $grey-light !default;
7
- $switch-border-radius: $base-border-radius !default;
6
+ $switch-background: var(--#{$prefix}grey-light) !default;
7
+ $switch-border-radius: var(--#{$prefix}base-border-radius) !default;
8
8
  $switch-box-shadow:
9
9
  0 3px 1px 0 rgba(0, 0, 0, 0.05),
10
10
  0 2px 2px 0 rgba(0, 0, 0, 0.1),
11
11
  0 3px 3px 0 rgba(0, 0, 0, 0.05) !default;
12
- $switch-disabled-opacity: $base-disabled-opacity !default;
12
+ $switch-disabled-opacity: var(--#{$prefix}base-disabled-opacity) !default;
13
13
  $switch-margin-label: 0.5em !default;
14
14
  $switch-padding: 0.2em !default;
15
- $switch-rounded-border-radius: $base-rounded-border-radius !default;
15
+ $switch-rounded-border-radius: var(
16
+ --#{$prefix}base-border-radius-rounded
17
+ ) !default;
16
18
  $switch-width: 2.75 * 1em !default;
17
19
  /* @docs */
18
20
 
19
21
  .o-switch {
22
+ @include unselectable;
20
23
  cursor: pointer;
21
24
  display: inline-flex;
22
25
  align-items: center;
23
26
  position: relative;
27
+ border-radius: 50rem;
24
28
 
25
- @include unselectable;
29
+ // size variants
30
+ @each $name, $value in $sizes {
31
+ &--#{$name} {
32
+ font-size: var(--#{$prefix}font-size-#{name}, $value);
33
+ }
34
+ }
26
35
 
36
+ // color variants
27
37
  @each $name, $pair in $colors {
28
38
  $color: list.nth($pair, 1);
39
+
29
40
  &--#{$name} {
41
+ --#{$prefix}focus: #{createFocus($color)};
42
+
30
43
  .o-switch__check--checked {
31
- @include avariable("background", ("variant-" + #{$name}), $color);
44
+ background: var(--#{$prefix}variant-#{$name}, $color);
32
45
  }
33
46
  }
34
47
  &--#{$name}-passive {
48
+ --#{$prefix}focus: #{createFocus($color)};
49
+
35
50
  .o-switch__check:not(.o-switch__check--checked) {
36
- @include avariable("background", ("variant-" + #{$name}), $color);
51
+ background: var(--#{$prefix}variant-#{$name}, $color);
37
52
  }
38
53
  }
39
54
  }
40
- @each $name, $value in $sizes {
41
- &--#{$name} {
42
- @include avariable("font-size", ("font-size-" + #{name}), $value);
43
- }
44
- }
45
55
 
46
56
  &__label {
47
- @include avariable(
48
- "margin-left",
49
- "switch-margin-label",
50
- $switch-margin-label
51
- );
57
+ margin-left: var(--#{$prefix}switch-margin-label, $switch-margin-label);
52
58
  }
53
59
 
54
60
  &--left {
@@ -56,49 +62,36 @@ $switch-width: 2.75 * 1em !default;
56
62
 
57
63
  .o-switch__label {
58
64
  margin-left: 0;
59
-
60
- @include avariable(
61
- "margin-right",
62
- "switch-margin-label",
63
- $switch-margin-label
64
- );
65
+ margin-right: var(--#{$prefix}switch-margin-label, $switch-margin-label);
65
66
  }
66
67
  }
67
68
 
68
69
  &__check-switch {
69
70
  content: "";
70
71
  display: block;
71
-
72
- @include evariable(
73
- "height",
74
- "calc(($width - $padding * 2) * 0.5)",
75
- eparam("$width", variable("switch-width", $switch-width)),
76
- eparam("$padding", variable("switch-padding", $switch-padding))
72
+ height: calc(
73
+ (
74
+ var(--#{$prefix}switch-width, $switch-width) - var(
75
+ --#{$prefix}switch-padding,
76
+ $switch-padding
77
+ ) * 2
78
+ ) * 0.5
77
79
  );
78
- @include evariable(
79
- "width",
80
- "calc(($width - $padding * 2) * 0.5)",
81
- eparam("$width", variable("switch-width", $switch-width)),
82
- eparam("$padding", variable("switch-padding", $switch-padding))
80
+ width: calc(
81
+ (
82
+ var(--#{$prefix}switch-width, $switch-width) - var(
83
+ --#{$prefix}switch-padding,
84
+ $switch-padding
85
+ ) * 2
86
+ ) * 0.5
83
87
  );
84
- @include avariable(
85
- "background",
86
- "switch-action-background",
88
+ background: var(
89
+ --#{$prefix}switch-action-background,
87
90
  $switch-action-background
88
91
  );
89
- @include avariable("box-shadow", "switch-box-shadow", $switch-box-shadow);
90
- transition-property: transform;
91
-
92
- @include avariable(
93
- "transition-duration",
94
- "transition-duration",
95
- $speed-slow
96
- );
97
- @include avariable(
98
- "transition-timing-function",
99
- "transition-timing",
100
- $easing
101
- );
92
+ box-shadow: var(--#{$prefix}switch-box-shadow, $switch-box-shadow);
93
+ transition: transform var(--#{$prefix}transition-duration)
94
+ var(--#{$prefix}transition-timing);
102
95
  will-change: transform;
103
96
  transform-origin: left;
104
97
  }
@@ -107,38 +100,21 @@ $switch-width: 2.75 * 1em !default;
107
100
  display: flex;
108
101
  align-items: center;
109
102
  flex-shrink: 0;
110
-
111
- @include avariable("width", "switch-width", $switch-width);
112
- @include evariable(
113
- "height",
114
- "calc($width * 0.5 + $padding)",
115
- eparam("$width", variable("switch-width", $switch-width)),
116
- eparam("$padding", variable("switch-padding", $switch-padding))
103
+ width: var(--#{$prefix}switch-width, $switch-width);
104
+ height: calc(
105
+ var(--#{$prefix}switch-width, $switch-width) * 0.5 +
106
+ var(--#{$prefix}switch-padding, $switch-padding)
117
107
  );
118
- @include avariable("padding", "switch-padding", $switch-padding);
119
- @include avariable("background", "switch-background", $switch-background);
120
- @include avariable(
121
- "border-radius",
122
- "switch-border-radius",
123
- $switch-border-radius
124
- );
125
- transition-property: background;
126
108
 
127
- @include avariable(
128
- "transition-duration",
129
- "transition-duration",
130
- $speed-slow
131
- );
132
- @include avariable(
133
- "transition-timing-function",
134
- "transition-timing",
135
- $easing
136
- );
109
+ padding: var(--#{$prefix}switch-padding, $switch-padding);
110
+ background: var(--#{$prefix}switch-background, $switch-background);
111
+ border-radius: var(--#{$prefix}switch-border-radius, $switch-border-radius);
112
+ transition: background var(--#{$prefix}transition-duration)
113
+ var(--#{$prefix}transition-timing);
137
114
 
138
115
  &--checked {
139
- @include avariable(
140
- "background",
141
- "switch-active-background-color",
116
+ background: var(
117
+ --#{$prefix}switch-active-background-color,
142
118
  $switch-active-background-color
143
119
  );
144
120
 
@@ -156,18 +132,19 @@ $switch-width: 2.75 * 1em !default;
156
132
  }
157
133
 
158
134
  &--rounded {
159
- @include avariable(
160
- "border-radius",
161
- "switch-rounded-border-radius",
135
+ border-radius: var(
136
+ --#{$prefix}switch-rounded-border-radius,
162
137
  $switch-rounded-border-radius
163
138
  );
164
139
  }
165
140
 
166
141
  &--disabled {
167
- @include avariable(
168
- "opacity",
169
- "switch-disabled-opacity",
170
- $switch-disabled-opacity
171
- );
142
+ opacity: var(--#{$prefix}switch-disabled-opacity, $switch-disabled-opacity);
143
+ }
144
+
145
+ // focus effect
146
+ &:focus &__check,
147
+ &:focus-within &__check {
148
+ box-shadow: 0 0 0 0.25rem var(--#{$prefix}focus);
172
149
  }
173
150
  }
@@ -4,36 +4,36 @@
4
4
  $table-background-color: #fff !default;
5
5
  $table-background: #f5f5f5 !default;
6
6
  $table-boder: 1px solid transparent !default;
7
- $table-border-radius: $base-border-radius !default;
7
+ $table-border-radius: var(--#{$prefix}base-border-radius) !default;
8
8
  $table-card-box-shadow:
9
- 0 2px 3px rgba($black, 0.1),
10
- 0 0 0 1px rgba($black, 0.1) !default;
9
+ 0 2px 3px rgba(var(--#{$prefix}black), 0.1),
10
+ 0 0 0 1px rgba(var(--#{$prefix}black), 0.1) !default;
11
11
  $table-card-cell-font-weight: 600 !default;
12
12
  $table-card-cell-padding: 0 0.5em 0 0 !default;
13
13
  $table-card-cell-text-align: left !default;
14
14
  $table-card-detail-margin: -1rem 0 0 0;
15
15
  $table-card-margin: 0 0 1rem 0;
16
16
  $table-color: black !default;
17
- $table-current-sort-border-color: $grey !default;
17
+ $table-current-sort-border-color: var(--#{$prefix}grey) !default;
18
18
  $table-current-sort-font-weight: 700 !default;
19
- $table-current-sort-hover-border-color: $grey !default;
19
+ $table-current-sort-hover-border-color: var(--#{$prefix}grey) !default;
20
20
  $table-detail-background: #fafafa !default;
21
- $table-detail-box-shadow: inset 0 1px 3px $grey !default;
22
- $table-detail-chevron-color: $primary !default;
21
+ $table-detail-box-shadow: inset 0 1px 3px var(--#{$prefix}grey) !default;
22
+ $table-detail-chevron-color: var(--#{$prefix}primary) !default;
23
23
  $table-detail-chevron-width: 40px !default;
24
24
  $table-detail-padding: 1rem !default;
25
- $table-focus-border-color: $primary !default;
26
- $table-focus-box-shadow: 0 0 0 0.125em rgba($primary, 0.25) !default;
25
+ $table-focus-border-color: var(--#{$prefix}primary) !default;
26
+ $table-focus-box-shadow: 0 0 0 0.125em rgba(var(--#{$prefix}primary), 0.25) !default;
27
27
  $table-hoverable-background-color: #fafafa !default;
28
28
  $table-narrow-padding: 0.25em 0.5em !default;
29
- $table-row-active-background-color: $primary !default;
30
- $table-row-active-color: $primary-invert !default;
29
+ $table-row-active-background-color: var(--#{$prefix}primary) !default;
30
+ $table-row-active-color: var(--#{$prefix}primary-invert) !default;
31
31
  $table-sticky-header-height: 300px !default;
32
32
  $table-sticky-zindex: 1 !default;
33
33
  $table-striped-background-color: #fafafa !default;
34
- $table-td-border: 1px solid $grey-lighter !default;
34
+ $table-td-border: 1px solid var(--#{$prefix}grey-lighter) !default;
35
35
  $table-td-padding: 0.5em 0.75em !default;
36
- $table-th-border: 2px solid $grey-lighter !default;
36
+ $table-th-border: 2px solid var(--#{$prefix}grey-lighter) !default;
37
37
  $table-th-checkbox-width: 40px !default;
38
38
  $table-th-color: #363636 !default;
39
39
  $table-th-detail-width: 14px !default;
@@ -46,32 +46,25 @@ $table-th-padding: 0.5em 0.75em !default;
46
46
  width: 100%;
47
47
  border-collapse: separate;
48
48
  border-spacing: 0;
49
-
50
- @include avariable("border", "table-boder", $table-boder);
51
- @include avariable(
52
- "border-radius",
53
- "table-border-radius",
54
- $table-border-radius
55
- );
56
- @include avariable(
57
- "background-color",
58
- "table-background-color",
49
+ border: var(--#{$prefix}table-boder, $table-boder);
50
+ border-radius: var(--#{$prefix}table-border-radius, $table-border-radius);
51
+ background-color: var(
52
+ --#{$prefix}table-background-color,
59
53
  $table-background-color
60
54
  );
61
- @include avariable("color", "table-color", $table-color);
55
+ color: var(--#{$prefix}table-color, $table-color);
62
56
 
63
57
  &__root {
64
58
  position: relative;
65
59
  }
66
60
 
67
61
  &__wrapper {
68
- transition: opacity $speed $easing;
62
+ transition: opacity $animation-speed-fast $animation-timing;
69
63
  position: relative;
70
64
 
71
65
  &--sticky-header {
72
- @include avariable(
73
- "height",
74
- "table-sticky-header-height",
66
+ height: var(
67
+ --#{$prefix}table-sticky-header-height,
75
68
  $table-sticky-header-height
76
69
  );
77
70
  overflow-y: auto;
@@ -81,12 +74,13 @@ $table-th-padding: 0.5em 0.75em !default;
81
74
  position: sticky;
82
75
  left: 0;
83
76
  top: 0;
84
-
85
- @include avariable(
86
- "background",
87
- "table-background-color",
77
+ background: var(
78
+ --#{$prefix}table-background-color,
88
79
  $table-background-color
89
80
  );
81
+ z-index: calc(
82
+ var(--#{$prefix}table-sticky-zindex, $table-sticky-zindex) + 1
83
+ );
90
84
  }
91
85
  }
92
86
 
@@ -134,9 +128,8 @@ $table-th-padding: 0.5em 0.75em !default;
134
128
  }
135
129
 
136
130
  tr {
137
- @include avariable(
138
- "box-shadow",
139
- "table-card-box-shadow",
131
+ box-shadow: var(
132
+ --#{$prefix}table-card-box-shadow,
140
133
  $table-card-box-shadow
141
134
  );
142
135
  max-width: 100%;
@@ -153,7 +146,7 @@ $table-th-padding: 0.5em 0.75em !default;
153
146
  }
154
147
 
155
148
  &:not(:last-child) {
156
- @include avariable("margin", "table-card-margin", $table-card-margin);
149
+ margin: var(--#{$prefix}table-card-margin, $table-card-margin);
157
150
  }
158
151
 
159
152
  &:not(.o-table__tr--selected) {
@@ -167,9 +160,8 @@ $table-th-padding: 0.5em 0.75em !default;
167
160
  }
168
161
 
169
162
  &.o-table--detailed {
170
- @include avariable(
171
- "margin",
172
- "table-card-detail-margin",
163
+ margin: var(
164
+ --#{$prefix}table-card-detail-margin,
173
165
  $table-card-detail-margin
174
166
  );
175
167
  }
@@ -181,29 +173,23 @@ $table-th-padding: 0.5em 0.75em !default;
181
173
  width: auto;
182
174
  justify-content: space-between;
183
175
  text-align: right;
184
-
185
- @include avariable(
186
- "border-bottom",
187
- "table-background",
176
+ border-bottom: var(
177
+ --#{$prefix}table-background,
188
178
  ($table-background 1px solid)
189
179
  );
190
180
 
191
181
  &:before {
192
182
  content: attr(data-label);
193
-
194
- @include avariable(
195
- "font-weight",
196
- "table-card-cell-font-weight",
183
+ font-weight: var(
184
+ --#{$prefix}table-card-cell-font-weight,
197
185
  $table-card-cell-font-weight
198
186
  );
199
- @include avariable(
200
- "padding-right",
201
- "table-card-cell-padding",
187
+ padding-right: var(
188
+ --#{$prefix}table-card-cell-padding,
202
189
  $table-card-cell-padding
203
190
  );
204
- @include avariable(
205
- "text-align",
206
- "table-card-cell-text-align",
191
+ text-align: var(
192
+ --#{$prefix}table-card-cell-text-align,
207
193
  $table-card-cell-text-align
208
194
  );
209
195
  }
@@ -220,15 +206,10 @@ $table-th-padding: 0.5em 0.75em !default;
220
206
  vertical-align: top;
221
207
  text-align: left;
222
208
  position: relative;
223
-
224
- @include avariable(
225
- "font-weight",
226
- "table-th-font-weight",
227
- $table-th-font-weight
228
- );
229
- @include avariable("color", "table-th-color", $table-th-color);
230
- @include avariable("border-bottom", "table-th-border", $table-th-border);
231
- @include avariable("padding", "table-th-padding", $table-th-padding);
209
+ font-weight: var(--#{$prefix}table-th-font-weight, $table-th-font-weight);
210
+ color: var(--#{$prefix}table-th-color, $table-th-color);
211
+ border-bottom: var(--#{$prefix}table-th-border, $table-th-border);
212
+ padding: var(--#{$prefix}table-th-padding, $table-th-padding);
232
213
 
233
214
  &--centered {
234
215
  text-align: center;
@@ -244,22 +225,16 @@ $table-th-padding: 0.5em 0.75em !default;
244
225
  }
245
226
 
246
227
  &-checkbox {
247
- @include avariable(
248
- "width",
249
- "table-th-checkbox-width",
250
- $table-th-checkbox-width
251
- );
228
+ width: var(--#{$prefix}table-th-checkbox-width, $table-th-checkbox-width);
252
229
  }
253
230
 
254
231
  &-current-sort {
255
- @include avariable(
256
- "border-color",
257
- "table-current-sort-border-color",
232
+ border-color: var(
233
+ --#{$prefix}table-current-sort-border-color,
258
234
  $table-current-sort-border-color
259
235
  );
260
- @include avariable(
261
- "font-weight",
262
- "table-current-sort-font-weight",
236
+ font-weight: var(
237
+ --#{$prefix}table-current-sort-font-weight,
263
238
  $table-current-sort-font-weight
264
239
  );
265
240
  }
@@ -268,9 +243,8 @@ $table-th-padding: 0.5em 0.75em !default;
268
243
  cursor: pointer;
269
244
 
270
245
  &:hover {
271
- @include avariable(
272
- "border-color",
273
- "table-current-sort-hover-border-color",
246
+ border-color: var(
247
+ --#{$prefix}table-current-sort-hover-border-color,
274
248
  $table-current-sort-hover-border-color
275
249
  );
276
250
  }
@@ -281,16 +255,9 @@ $table-th-padding: 0.5em 0.75em !default;
281
255
  position: sticky;
282
256
  left: 0;
283
257
  top: 0;
284
-
285
- @include evariable(
286
- "z-index",
287
- "calc($param + $factor)",
288
- eparam("$param", variable("table-sticky-zindex", $table-sticky-zindex)),
289
- eparam("$factor", 2)
290
- );
291
- @include avariable(
292
- "background",
293
- "table-background-color",
258
+ z-index: var(--#{$prefix}table-sticky-zindex, $table-sticky-zindex);
259
+ background: var(
260
+ --#{$prefix}table-background-color,
294
261
  $table-background-color
295
262
  );
296
263
  }
@@ -300,34 +267,23 @@ $table-th-padding: 0.5em 0.75em !default;
300
267
  }
301
268
 
302
269
  &--detailed {
303
- @include avariable(
304
- "width",
305
- "table-th-detail-width",
306
- $table-th-detail-width
307
- );
270
+ width: var(--#{$prefix}table-th-detail-width, $table-th-detail-width);
308
271
  }
309
272
  }
310
273
 
311
274
  &__td {
312
275
  vertical-align: top;
313
276
  text-align: left;
314
-
315
- @include avariable("border-bottom", "table-td-border", $table-td-border);
316
- @include avariable("padding", "table-td-padding", $table-td-padding);
277
+ border-bottom: var(--#{$prefix}table-td-border, $table-td-border);
278
+ padding: var(--#{$prefix}table-td-padding, $table-td-padding);
317
279
 
318
280
  &--sticky {
319
281
  position: -webkit-sticky;
320
282
  position: sticky;
321
283
  left: 0;
322
-
323
- @include avariable(
324
- "z-index",
325
- "table-sticky-zindex",
326
- $table-sticky-zindex
327
- );
328
- @include avariable(
329
- "background",
330
- "table-background-color",
284
+ z-index: var(--#{$prefix}table-sticky-zindex, $table-sticky-zindex);
285
+ background: var(
286
+ --#{$prefix}table-background-color,
331
287
  $table-background-color
332
288
  );
333
289
  }
@@ -342,29 +298,24 @@ $table-th-padding: 0.5em 0.75em !default;
342
298
 
343
299
  &-chevron {
344
300
  vertical-align: middle;
345
-
346
- @include avariable(
347
- "width",
348
- "table-detail-chevron-width",
301
+ width: var(
302
+ --#{$prefix}table-detail-chevron-width,
349
303
  $table-detail-chevron-width
350
304
  );
351
- @include avariable(
352
- "color",
353
- "table-detail-chevron-color",
305
+ color: var(
306
+ --#{$prefix}table-detail-chevron-color,
354
307
  $table-detail-chevron-color
355
308
  );
356
309
  }
357
310
  }
358
311
 
359
312
  &:focus {
360
- @include avariable(
361
- "border-color",
362
- "table-focus-border-color",
313
+ border-color: var(
314
+ --#{$prefix}table-focus-border-color,
363
315
  $table-focus-border-color
364
316
  );
365
- @include avariable(
366
- "box-shadow",
367
- "table-focus-box-shadow",
317
+ box-shadow: var(
318
+ --#{$prefix}table-focus-box-shadow,
368
319
  $table-focus-box-shadow
369
320
  );
370
321
  }
@@ -373,21 +324,20 @@ $table-th-padding: 0.5em 0.75em !default;
373
324
  tr:last-child {
374
325
  td,
375
326
  th {
376
- @include avariable("border", "table-td-border", $table-td-border);
327
+ border: var(--#{$prefix}table-td-border, $table-td-border);
377
328
  }
378
329
  }
379
330
 
380
331
  td,
381
332
  th {
382
- @include avariable("border", "table-td-border", $table-td-border);
333
+ border: var(--#{$prefix}table-td-border, $table-td-border);
383
334
  }
384
335
  }
385
336
 
386
337
  &--striped {
387
338
  tbody tr:not(.o-table__tr--selected):nth-child(2n) {
388
- @include avariable(
389
- "background-color",
390
- "table-striped-background-color",
339
+ background-color: var(
340
+ --#{$prefix}table-striped-background-color,
391
341
  $table-striped-background-color
392
342
  );
393
343
  }
@@ -396,42 +346,31 @@ $table-th-padding: 0.5em 0.75em !default;
396
346
  &--narrowed {
397
347
  td,
398
348
  th {
399
- @include avariable(
400
- "padding",
401
- "table-narrow-padding",
402
- $table-narrow-padding
403
- );
349
+ padding: var(--#{$prefix}table-narrow-padding, $table-narrow-padding);
404
350
  }
405
351
  }
406
352
 
407
353
  &--hoverable {
408
354
  tbody tr:not(.o-table__tr--selected):hover {
409
- @include avariable(
410
- "background-color",
411
- "table-hoverable-background-color",
355
+ background-color: var(
356
+ --#{$prefix}table-hoverable-background-color,
412
357
  $table-hoverable-background-color
413
358
  );
414
359
  }
415
360
  }
416
361
 
417
362
  &__detail {
418
- @include avariable(
419
- "box-shadow",
420
- "table-detail-box-shadow",
363
+ box-shadow: var(
364
+ --#{$prefix}table-detail-box-shadow,
421
365
  $table-detail-box-shadow
422
366
  );
423
- @include avariable(
424
- "background",
425
- "table-detail-background",
367
+ background: var(
368
+ --#{$prefix}table-detail-background,
426
369
  $table-detail-background
427
370
  );
428
371
 
429
372
  td {
430
- @include avariable(
431
- "padding",
432
- "table-detail-padding",
433
- $table-detail-padding
434
- );
373
+ padding: var(--#{$prefix}table-detail-padding, $table-detail-padding);
435
374
  }
436
375
  }
437
376