@progress/kendo-theme-core 14.1.1-dev.3 → 14.2.0-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 (36) hide show
  1. package/dist/all.css +1 -1
  2. package/dist/meta/sassdoc-data.json +2445 -1812
  3. package/dist/meta/sassdoc-raw-data.json +5353 -4781
  4. package/package.json +2 -3
  5. package/scss/border-radii/index.scss +4 -0
  6. package/scss/color-system/_functions.scss +2 -2
  7. package/scss/components/diagram/_layout.scss +13 -0
  8. package/scss/components/diagram/_theme.scss +2 -0
  9. package/scss/components/diagram/_variables.scss +1 -0
  10. package/scss/components/drawer/_theme.scss +0 -13
  11. package/scss/components/drawer/_variables.scss +0 -3
  12. package/scss/components/grid/_theme.scss +2 -2
  13. package/scss/components/loader/_layout.scss +3 -2
  14. package/scss/components/mediaplayer/_theme.scss +1 -1
  15. package/scss/components/scheduler/_layout.scss +333 -0
  16. package/scss/components/scheduler/_theme.scss +71 -0
  17. package/scss/components/scheduler/_variables.scss +19 -0
  18. package/scss/components/slider/_layout.scss +2 -2
  19. package/scss/components/timeline/_theme.scss +0 -19
  20. package/scss/elevation/index.scss +11 -4
  21. package/scss/functions/_color.scss +31 -12
  22. package/scss/functions/_default.scss +1 -0
  23. package/scss/functions/_lang.scss +1 -0
  24. package/scss/functions/_list.scss +2 -0
  25. package/scss/functions/_map.scss +5 -0
  26. package/scss/functions/_math.scss +4 -0
  27. package/scss/functions/_meta.scss +12 -0
  28. package/scss/functions/_string.scss +7 -0
  29. package/scss/motion/index.scss +12 -0
  30. package/scss/spacing/index.scss +4 -0
  31. package/scss/styles/_scrollbar.scss +6 -0
  32. package/scss/translucency/index.scss +8 -0
  33. package/scss/z-index/index.scss +1 -0
  34. package/scss/components/adaptive/_layout.scss +0 -468
  35. package/scss/components/adaptive/_theme.scss +0 -100
  36. package/scss/components/adaptive/_variables.scss +0 -30
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@progress/kendo-theme-core",
3
3
  "description": "A collection of functions and mixins used for building themes for Kendo UI",
4
- "version": "14.1.1-dev.3",
4
+ "version": "14.2.0-0",
5
5
  "author": "Progress",
6
6
  "license": "Apache-2.0",
7
7
  "keywords": [
@@ -45,6 +45,5 @@
45
45
  },
46
46
  "directories": {
47
47
  "doc": "docs"
48
- },
49
- "gitHead": "bb56b0126e8d6f3e5d77c2ac6d87e8d90d450711"
48
+ }
50
49
  }
@@ -52,6 +52,10 @@ $kendo-border-radii: $default-border-radii !default;
52
52
  $kendo-border-radii: map.merge($default-border-radii, $kendo-border-radii);
53
53
 
54
54
 
55
+ /// Returns a CSS variable reference for a border-radius token.
56
+ /// @param {String} $key - The border-radius key from $kendo-border-radii.
57
+ /// @return {String} CSS variable reference for the given border-radius token.
58
+ /// @group functions
55
59
  @function k-border-radius($key) {
56
60
  @return var(--kendo-border-radius-#{$key});
57
61
  }
@@ -90,7 +90,7 @@
90
90
  /// @param {String} $theme - The theme the colors will be generated for
91
91
  /// @return {Map} - A map with the generated keys and values
92
92
  ///
93
- /// @group color-system
93
+ /// @group functions
94
94
  @function k-generate-color-variations( $name, $color, $theme: null ) {
95
95
  $result: ();
96
96
 
@@ -212,7 +212,7 @@
212
212
  /// @param {String} $key - The name of a color/key in the $kendo-colors map
213
213
  /// @return {String} - CSS variable with the actual color as a fallback
214
214
  ///
215
- /// @group color-system
215
+ /// @group functions
216
216
  @function k-color($key) {
217
217
  @return var(--kendo-color-#{$key});
218
218
  }
@@ -0,0 +1,13 @@
1
+ @use "../../spacing/index.scss" as *;
2
+
3
+ @mixin kendo-diagram--layout-base() {
4
+
5
+ // Diagram shapes container
6
+ .k-diagram-shapes-container {
7
+ padding: k-spacing(1);
8
+ display: grid;
9
+ grid-template-columns: repeat(4, max-content);
10
+ gap: k-spacing(3);
11
+ }
12
+
13
+ }
@@ -0,0 +1,2 @@
1
+ @mixin kendo-diagram--theme-base() {
2
+ }
@@ -0,0 +1 @@
1
+ // Diagram
@@ -12,19 +12,6 @@
12
12
  }
13
13
 
14
14
  // Drawer items
15
- .k-drawer-wrapper {
16
- scrollbar-color: $kendo-drawer-scrollbar-color $kendo-drawer-scrollbar-bg;
17
-
18
- &::-webkit-scrollbar-track {
19
- background: $kendo-drawer-scrollbar-bg;
20
- }
21
- &::-webkit-scrollbar-thumb {
22
- background: $kendo-drawer-scrollbar-color;
23
- }
24
- &::-webkit-scrollbar-thumb:hover {
25
- background: $kendo-drawer-scrollbar-hover-color;
26
- }
27
- }
28
15
  .k-drawer-item {
29
16
 
30
17
  &:hover,
@@ -14,10 +14,7 @@ $kendo-drawer-content-padding-x: null !default;
14
14
  $kendo-drawer-content-padding-y: null !default;
15
15
 
16
16
  $kendo-drawer-scrollbar-width: null !default;
17
- $kendo-drawer-scrollbar-color: null !default;
18
- $kendo-drawer-scrollbar-bg: null !default;
19
17
  $kendo-drawer-scrollbar-radius: null !default;
20
- $kendo-drawer-scrollbar-hover-color: null !default;
21
18
 
22
19
  $kendo-drawer-items-padding-x: null !default;
23
20
  $kendo-drawer-items-padding-y: null !default;
@@ -94,7 +94,7 @@
94
94
 
95
95
  .k-grid-content-sticky {
96
96
  border-inline-color: $kendo-grid-sticky-border;
97
- border-block-start-color: $kendo-grid-header-border;
97
+ border-block-end-color: $kendo-grid-sticky-border;
98
98
  }
99
99
 
100
100
  &:hover .k-grid-content-sticky,
@@ -120,7 +120,7 @@
120
120
  .k-grid-content-sticky {
121
121
  background-color: $kendo-grid-sticky-bg;
122
122
  border-inline-color: $kendo-grid-sticky-border;
123
- border-block-start-color: $kendo-grid-header-border;
123
+ border-block-end-color: $kendo-grid-sticky-border;
124
124
  }
125
125
 
126
126
  &.k-table-row {
@@ -1,5 +1,6 @@
1
1
  @use "./_variables.scss" as *;
2
2
  @use "../overlay/_variables.scss" as *;
3
+ @use "../icons/_variables.scss" as *;
3
4
  @use "../../z-index/index.scss" as *;
4
5
  @use "../../functions/index.scss" as *;
5
6
 
@@ -517,8 +518,8 @@
517
518
 
518
519
  // Loading indicator
519
520
  .k-i-loading {
520
- width: 1em;
521
- height: 1em;
521
+ width: $kendo-icon-size-md;
522
+ height: $kendo-icon-size-md;
522
523
  line-height: 1;
523
524
  display: inline-flex;
524
525
  flex-flow: row nowrap;
@@ -18,7 +18,7 @@
18
18
  // Title bar
19
19
  .k-mediaplayer-titlebar {
20
20
  color: $kendo-media-player-titlebar-text;
21
- background-image: linear-gradient( $kendo-media-player-titlebar-gradient );
21
+ background-image: if( $kendo-media-player-titlebar-gradient, linear-gradient( $kendo-media-player-titlebar-gradient ), null );
22
22
  text-shadow: 0 0 2px color-mix(in srgb, k-color(on-app-surface) 50%, transparent);
23
23
  }
24
24
 
@@ -7,6 +7,7 @@
7
7
  @use "../toolbar/_variables.scss" as *;
8
8
  @use "../icons/_variables.scss" as *;
9
9
  @use "../../z-index/index.scss" as *;
10
+ @use "../listgroup/_variables.scss" as *;
10
11
 
11
12
  @mixin kendo-scheduler--layout-base() {
12
13
 
@@ -936,4 +937,336 @@
936
937
  }
937
938
  }
938
939
 
940
+
941
+ // Adaptive rendering container
942
+ .k-pane-wrapper {
943
+ border-width: $kendo-scheduler-adaptive-border-width;
944
+ border-style: solid;
945
+ box-sizing: border-box;
946
+ outline: 0;
947
+ font-family: $kendo-scheduler-adaptive-font-family;
948
+ font-size: $kendo-scheduler-adaptive-font-size;
949
+ line-height: $kendo-scheduler-adaptive-line-height;
950
+ display: block;
951
+ position: relative;
952
+ -webkit-touch-callout: none;
953
+ -webkit-tap-highlight-color: $kendo-color-rgba-transparent;
954
+
955
+ .k-pane {
956
+ width: 100%;
957
+ height: 100%;
958
+ user-select: none;
959
+ box-sizing: border-box;
960
+ font-family: sans-serif;
961
+ overflow-x: hidden;
962
+ }
963
+
964
+ .k-view {
965
+ inset-block-start: 0;
966
+ inset-inline-start: 0;
967
+ position: relative;
968
+ border: 0;
969
+ box-sizing: border-box;
970
+ outline: 0;
971
+ font-family: $kendo-scheduler-adaptive-font-family;
972
+ font-size: $kendo-scheduler-adaptive-font-size;
973
+ line-height: $kendo-scheduler-adaptive-line-height;
974
+ display: flex;
975
+ height: 100%;
976
+ width: 100%;
977
+ flex-direction: column;
978
+ align-items: stretch;
979
+ align-content: stretch;
980
+ vertical-align: top;
981
+ -webkit-touch-callout: none;
982
+ -webkit-tap-highlight-color: $kendo-color-rgba-transparent;
983
+ }
984
+
985
+ .k-content {
986
+ min-height: 1px;
987
+ flex: 1;
988
+ align-items: stretch;
989
+ display: block;
990
+ width: auto;
991
+ overflow: hidden;
992
+ position: relative;
993
+ }
994
+
995
+ // Common adaptive layout
996
+ .k-appbar {
997
+ padding: k-spacing(1);
998
+ }
999
+
1000
+ .k-list-title,
1001
+ .k-filter-help-text {
1002
+ padding-block: $kendo-listgroup-item-padding-y;
1003
+ padding-inline: $kendo-listgroup-item-padding-x;
1004
+ display: block;
1005
+ }
1006
+
1007
+ .k-listgroup-title {
1008
+ padding-block: $kendo-listgroup-item-padding-y;
1009
+ padding-inline: $kendo-listgroup-item-padding-x;
1010
+ font-weight: bold;
1011
+ text-transform: uppercase;
1012
+ }
1013
+
1014
+ .k-listgroup {
1015
+
1016
+ .k-listgroup-item {
1017
+ border-color: inherit;
1018
+ }
1019
+ }
1020
+ .k-listgroup + .k-listgroup {
1021
+ margin-block-start: k-spacing(4);
1022
+ }
1023
+
1024
+ .k-popup-edit-form {
1025
+
1026
+ .k-recur-editor-wrap {
1027
+ display: flex;
1028
+ }
1029
+
1030
+ .k-mobiletimezoneeditor {
1031
+ display: flex;
1032
+ align-items: center;
1033
+ justify-content: flex-end;
1034
+ position: relative;
1035
+ flex: 1 1 auto;
1036
+ }
1037
+ }
1038
+
1039
+ .k-multicheck-wrap.k-listgroup {
1040
+ overflow-y: auto;
1041
+ }
1042
+ }
1043
+
1044
+
1045
+ // Scheduler adaptive styles
1046
+ .k-pane-wrapper { // stylelint-disable-line
1047
+
1048
+ .k-scheduler-edit-form {
1049
+
1050
+ .k-recur-view {
1051
+ padding: 0;
1052
+ flex-direction: column;
1053
+ align-items: stretch;
1054
+
1055
+ > .k-listgroup-form-row {
1056
+ margin: 0;
1057
+ }
1058
+ }
1059
+
1060
+ .k-recur-items-wrap {
1061
+ width: 100%;
1062
+ margin-block: -1px;
1063
+ margin-inline: 0;
1064
+ }
1065
+
1066
+ .k-scheduler-recur-end-wrap {
1067
+ white-space: nowrap;
1068
+ }
1069
+ }
1070
+ }
1071
+
1072
+ .k-scheduler {
1073
+ &.k-scheduler-mobile {
1074
+ border-width: 0;
1075
+ }
1076
+ }
1077
+
1078
+ .k-scheduler-mobile {
1079
+
1080
+ border-radius: 0;
1081
+
1082
+ th {
1083
+ font-weight: normal;
1084
+ }
1085
+
1086
+ .k-event:hover .k-resize-handle {
1087
+ visibility: hidden;
1088
+ }
1089
+
1090
+ .k-scheduler-toolbar {
1091
+ padding-block: $kendo-toolbar-md-padding-y;
1092
+ padding-inline: $kendo-toolbar-md-padding-x;
1093
+ border-radius: 0;
1094
+
1095
+ > * {
1096
+ margin: 0;
1097
+ }
1098
+
1099
+ &::before {
1100
+ display: none;
1101
+ }
1102
+
1103
+ .k-scheduler-navigation {
1104
+ width: 100%;
1105
+ display: flex;
1106
+ flex-flow: row nowrap;
1107
+ justify-content: space-between;
1108
+ margin: 0;
1109
+
1110
+ .k-nav-current {
1111
+ line-height: 1;
1112
+ display: flex;
1113
+ flex-flow: column nowrap;
1114
+ align-items: center;
1115
+ justify-content: space-evenly;
1116
+ gap: 0;
1117
+ }
1118
+ }
1119
+
1120
+ .k-scheduler-views-wrapper {
1121
+ .k-views-dropdown {
1122
+ display: inline-block;
1123
+ }
1124
+ }
1125
+ }
1126
+
1127
+ .k-scheduler-footer {
1128
+ padding-block: $kendo-toolbar-md-padding-y;
1129
+ padding-inline: $kendo-toolbar-md-padding-x;
1130
+ display: flex;
1131
+ justify-content: space-between;
1132
+ border-radius: 0;
1133
+
1134
+ > * {
1135
+ margin: 0;
1136
+ }
1137
+
1138
+ &::before {
1139
+ display: none;
1140
+ }
1141
+ }
1142
+
1143
+ .k-scheduler-monthview {
1144
+
1145
+ .k-hidden {
1146
+ height: 40px;
1147
+ }
1148
+
1149
+ .k-scheduler-table td {
1150
+ height: 40px;
1151
+ vertical-align: top;
1152
+ text-align: center;
1153
+ }
1154
+
1155
+ .k-events-container {
1156
+ position: absolute;
1157
+ text-align: center;
1158
+ height: 6px;
1159
+ line-height: 6px;
1160
+ }
1161
+
1162
+ .k-event {
1163
+ position: static;
1164
+ padding: 4px;
1165
+ border-radius: 50%;
1166
+ display: inline-block;
1167
+ width: 4px;
1168
+ height: 4px;
1169
+ min-height: 0;
1170
+ margin: 1px;
1171
+ }
1172
+ }
1173
+
1174
+ // Removing the "Days" header from the Mobile Scheduler will break the Web Scheduler
1175
+ // Thus, the below selector is needed
1176
+ .k-scheduler-dayview .k-mobile-header {
1177
+
1178
+ &.k-mobile-horizontal-header .k-scheduler-times table tr:first-child {
1179
+ display: none;
1180
+ }
1181
+
1182
+ .k-scheduler-header .k-scheduler-date-group {
1183
+ display: none;
1184
+ }
1185
+ }
1186
+
1187
+ .k-scheduler-header-wrap > div {
1188
+ overflow: visible;
1189
+ }
1190
+
1191
+ .k-scheduler-agendaview {
1192
+ .k-mobile-header {
1193
+ display: none;
1194
+ }
1195
+
1196
+ .k-scheduler-table {
1197
+ table-layout: auto;
1198
+
1199
+ .k-scheduler-groupcolumn {
1200
+ width: 1%;
1201
+ }
1202
+
1203
+ td {
1204
+ white-space: normal;
1205
+ }
1206
+ }
1207
+ }
1208
+
1209
+ .k-mobile-header {
1210
+ .k-scheduler-table td,
1211
+ .k-scheduler-table th {
1212
+ height: 1.5em;
1213
+ }
1214
+ }
1215
+
1216
+ .k-time-text,
1217
+ .k-time-period {
1218
+ display: block;
1219
+ line-height: 1;
1220
+ }
1221
+
1222
+ .k-time-period {
1223
+ font-size: .7em;
1224
+ }
1225
+
1226
+ .k-scheduler-table td,
1227
+ .k-scheduler-table th {
1228
+ height: 2em;
1229
+ vertical-align: middle;
1230
+ }
1231
+
1232
+ .k-scheduler-datecolumn-wrap {
1233
+ display: flex;
1234
+ align-items: center;
1235
+ justify-content: space-between;
1236
+ }
1237
+
1238
+ .k-task {
1239
+ display: flex;
1240
+ align-items: center;
1241
+ gap: .5em;
1242
+
1243
+ .k-scheduler-mark {
1244
+ border-radius: 50%;
1245
+ margin: 0;
1246
+ }
1247
+
1248
+ .k-scheduler-task-text {
1249
+ flex: 1 1 0%;
1250
+ }
1251
+ }
1252
+
1253
+ .k-scheduler-times,
1254
+ .k-scheduler-agenda {
1255
+
1256
+ .k-scheduler-group-cell,
1257
+ .k-scheduler-groupcolumn {
1258
+ vertical-align: top;
1259
+
1260
+ .k-scheduler-group-text {
1261
+ writing-mode: vertical-lr;
1262
+ transform: rotate(180deg);
1263
+ white-space: nowrap;
1264
+ }
1265
+ }
1266
+ }
1267
+
1268
+ .k-scrollbar-h tr + tr .k-scheduler-times {
1269
+ border-block-end-width: 0;
1270
+ }
1271
+ }
939
1272
  }
@@ -235,4 +235,75 @@
235
235
  // Scheduler edit form
236
236
  .k-scheduler-edit-form {}
237
237
 
238
+
239
+ // Adaptive
240
+ .k-pane-wrapper,
241
+ .k-view {
242
+ @include fill(
243
+ $kendo-scheduler-adaptive-text,
244
+ $kendo-scheduler-adaptive-bg,
245
+ $kendo-scheduler-adaptive-border
246
+ );
247
+ }
248
+
249
+ .k-pane-wrapper .k-pane {
250
+
251
+ > .k-view > .k-content {
252
+ background-position: 50% 50%;
253
+ background-color: $kendo-scheduler-adaptive-content-bg;
254
+ }
255
+ }
256
+
257
+ .k-pane-wrapper .k-pane {
258
+
259
+ .k-scheduler-mobile {
260
+
261
+ .k-nav-current {
262
+ color: $kendo-scheduler-adaptive-current-text;
263
+ }
264
+
265
+ .k-scheduler-times,
266
+ .k-scheduler-header,
267
+ .k-scheduler-groupcolumn,
268
+ .k-mobile-scheduler-agendadate {
269
+ color: $kendo-scheduler-adaptive-base-text;
270
+ }
271
+
272
+ .k-time-period,
273
+ .k-mobile-scheduler-agendaweekday {
274
+ color: $kendo-scheduler-adaptive-subtle-text;
275
+ }
276
+
277
+ .k-scheduler-times,
278
+ .k-scheduler-header,
279
+ .k-scheduler-header-wrap,
280
+ .k-scheduler-datecolumn,
281
+ .k-scheduler-groupcolumn,
282
+ .k-scheduler-group-cell,
283
+ .k-scheduler-header-all-day {
284
+ background-color: $kendo-scheduler-adaptive-content-bg;
285
+ }
286
+
287
+ .k-scheduler-toolbar .k-scheduler-tools > li {
288
+ display: inline-block;
289
+ background-color: inherit;
290
+ }
291
+ }
292
+
293
+ .k-scheduler-edit-form {
294
+
295
+ .k-item,
296
+ .k-link {
297
+ color: k-color(on-app-surface);
298
+ }
299
+
300
+ .k-scheduler-delete,
301
+ .k-scheduler-resetSeries { // stylelint-disable-line
302
+ color: $kendo-scheduler-adaptive-menu-clear-text;
303
+ }
304
+
305
+ }
306
+
307
+ }
308
+
238
309
  }
@@ -103,3 +103,22 @@ $kendo-scheduler-marquee-label-inset-x: null !default;
103
103
  $kendo-scheduler-marquee-label-inset-y: null !default;
104
104
 
105
105
  $kendo-scheduler-header-bg: null !default;
106
+
107
+
108
+ // Adaptive
109
+ $kendo-scheduler-adaptive-bg: null !default;
110
+ $kendo-scheduler-adaptive-text: null !default;
111
+ $kendo-scheduler-adaptive-border: null !default;
112
+
113
+ $kendo-scheduler-adaptive-content-bg: null !default;
114
+
115
+ $kendo-scheduler-adaptive-menu-clear-text: null !default;
116
+
117
+ $kendo-scheduler-adaptive-border-width: null !default;
118
+ $kendo-scheduler-adaptive-font-family: null !default;
119
+ $kendo-scheduler-adaptive-font-size: null !default;
120
+ $kendo-scheduler-adaptive-line-height: null !default;
121
+
122
+ $kendo-scheduler-adaptive-current-text: null !default;
123
+ $kendo-scheduler-adaptive-base-text: null !default;
124
+ $kendo-scheduler-adaptive-subtle-text: null !default;
@@ -122,7 +122,7 @@
122
122
  }
123
123
  .k-draghandle:focus,
124
124
  .k-draghandle:active {
125
- transform: translate(-50%, -50%) scale($kendo-slider-draghandle-active-scale);
125
+ transform: if( $kendo-slider-draghandle-active-scale, translate(-50%, -50%) scale($kendo-slider-draghandle-active-scale), null );
126
126
  }
127
127
 
128
128
  .k-slider-selection {
@@ -151,7 +151,7 @@
151
151
  }
152
152
  .k-draghandle:focus,
153
153
  .k-draghandle:active {
154
- transform: translate(-50%, 50%) scale($kendo-slider-draghandle-active-scale);
154
+ transform: if( $kendo-slider-draghandle-active-scale, translate(-50%, 50%) scale($kendo-slider-draghandle-active-scale), null );
155
155
  }
156
156
 
157
157
  .k-slider-selection {
@@ -24,25 +24,6 @@
24
24
  background-color: $kendo-card-bg;
25
25
  color: $kendo-card-text;
26
26
  }
27
-
28
- .k-card-body {
29
-
30
- // Scrollbar styles for Mozilla
31
- scrollbar-color: $kendo-card-border $kendo-card-bg;
32
-
33
- // Scrollbar styles for Chrome, Safari and Opera
34
- &::-webkit-scrollbar-track {
35
- background: $kendo-card-bg;
36
- }
37
-
38
- &::-webkit-scrollbar-thumb {
39
- background: $kendo-card-border;
40
- }
41
-
42
- &::-webkit-scrollbar-thumb:hover {
43
- background: k-color(border);
44
- }
45
- }
46
27
  }
47
28
 
48
29
  // TODO: remove
@@ -36,6 +36,10 @@ $kendo-elevation: map.merge($default-elevation, $kendo-elevation);
36
36
  @return #{$result};
37
37
  }
38
38
 
39
+ /// Returns a CSS variable reference for an elevation shadow level.
40
+ /// @param {Number} $level - The elevation level key from $kendo-elevation.
41
+ /// @return {String} CSS variable reference for the given elevation level.
42
+ /// @group functions
39
43
  @function k-elevation($level) {
40
44
  @return var(--kendo-elevation-#{$level});
41
45
  }
@@ -46,10 +50,13 @@ $kendo-elevation-bg-lightness-step: 0.015 !default;
46
50
  // Each elevation-bg level increases oklch chroma by level * this value.
47
51
  $kendo-elevation-bg-chroma-step: 0.001 !default;
48
52
 
49
- // The background color for a given elevation level is calculated by increasing the lightness and chroma of the base background color
50
- // by a step multiplied by the elevation level, but only if the base background color is light (for light themes) or dark (for dark themes).
51
- // This is achieved by multiplying the steps by a clamp function that returns 1 when the background color is in the appropriate range and 0 otherwise.
52
- // clamp(0, (0.5 - l) * 99999, 1) → 1 when bg is dark, 0 when light
53
+ /// Returns an elevated background color expression using oklch relative color syntax.
54
+ /// The lightness and chroma are increased per elevation level, but only when the
55
+ /// base color is in the appropriate light/dark range.
56
+ /// @param {Number} $level - The elevation level that drives lightness and chroma increase.
57
+ /// @param {Color} $color - The base background color.
58
+ /// @return {String} An oklch relative color expression that represents the elevated background.
59
+ /// @group functions
53
60
  @function k-elevation-bg($level, $color) {
54
61
  $_result: "oklch(from #{$color} calc(l + #{$level} * #{$kendo-elevation-bg-lightness-step} * clamp(0, (0.5 - l) * 99999, 1)) calc(c + #{$level} * #{$kendo-elevation-bg-chroma-step} * clamp(0, (0.5 - l) * 99999, 1)) h)";
55
62
  @return #{$_result};