Skip to content

Commit c8d1735

Browse files
authored
feat(grid): add new action-border-color property (#587)
* feat(grid): add new action-border-color property * fix(grid): fix expander icons color * fix(grid): revert fix expander icons color
1 parent 8b7d155 commit c8d1735

3 files changed

Lines changed: 49 additions & 0 deletions

File tree

packages/theming/sass/themes/components/grid/_grid-theme.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
/// @param {String} $row-border-width [null] - The row bottom border width.
5353
/// @param {String} $row-border-style [null] - The row bottom border style.
5454
/// @param {Color} $row-border-color [null] - The row bottom border color. Auto-derived from content-background.
55+
/// @param {Color} $action-border-color [null] - The color used for action borders.
5556
/// @param {String} $pinned-border-width [null] - The border width of the pinned border.
5657
/// @param {String} $pinned-border-style [null] - The CSS border style of the pinned border.
5758
/// @param {Color} $pinned-border-color [null] - The color of the pinned border. Auto-derived from content-background.
@@ -160,6 +161,8 @@
160161
$row-border-style: null,
161162
$row-border-color: null,
162163
164+
$action-border-color: null,
165+
163166
$pinned-border-width: null,
164167
$pinned-border-style: null,
165168
$pinned-border-color: null,
@@ -396,6 +399,10 @@
396399
$row-border-color: hsl(from color-mix(in srgb, var(--foreground) 16%, var(--background)) h s l / 0.38);
397400
}
398401

402+
@if not($action-border-color) and $foreground and $background {
403+
$action-border-color: color-mix(in srgb, var(--foreground) 20%, var(--background));
404+
}
405+
399406
@if not($pinned-border-color) and $foreground and $background {
400407
$pinned-border-color: color-mix(in srgb, var(--foreground) 20%, var(--background));
401408
}
@@ -682,6 +689,8 @@
682689
row-border-style: $row-border-style,
683690
row-border-color: $row-border-color,
684691

692+
action-border-color: $action-border-color,
693+
685694
pinned-border-width: $pinned-border-width,
686695
pinned-border-style: $pinned-border-style,
687696
pinned-border-color: $pinned-border-color,

packages/theming/sass/themes/schemas/components/dark/_grid.scss

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
/// @prop {Color} content-background [color: 'surface'] - The table body background color.
1313
/// @prop {Map} drop-area-background [color: ('gray', 100, .4)] - The drop area background color.
1414
/// @prop {Map} header-border-color [color: ('gray', 200)] - The color used for header borders.
15+
/// @prop {Map} action-border-color [color: ('gray', 200)] - The color used for action borders.
1516
/// @prop {Map} header-background [color: ('gray', 100)] - The table header background color.
1617
/// @prop {Map} header-selected-background [color: ('secondary', 600)] - The table header background color when selected (ex. column selection).
1718
/// @prop {Map} header-selected-text-color [contrast-color: ('secondary', 600)] - The table header text color when selected (ex. column selection).
@@ -54,6 +55,13 @@ $base-dark-grid: (
5455
),
5556
),
5657

58+
action-border-color: (
59+
color: (
60+
'gray',
61+
200,
62+
),
63+
),
64+
5765
header-background: (
5866
color: (
5967
'gray',
@@ -456,6 +464,7 @@ $dark-bootstrap-grid: extend(
456464
/// @type Map
457465
/// @prop {Map} content-text-color [contrast-color: ('gray', 50, .8)] - The table body text color.
458466
/// @prop {Map} header-border-color [color: ('gray', 200)] - The color used for header borders.
467+
/// @prop {Map} action-border-color [color: ('gray', 200)] - The color used for action borders.
459468
/// @prop {Map} header-text-color [contrast-color: ('gray', 50, .9)] - The table header text color.
460469
/// @prop {Map} header-selected-background [color: ('primary', 900)] - The table header background color when selected (ex. column selection).
461470
/// @prop {Map} header-selected-text-color [contrast-color: ('gray' 50)] - The table header text color when selected (ex. column selection).
@@ -528,6 +537,13 @@ $dark-indigo-grid: extend(
528537
),
529538
),
530539

540+
action-border-color: (
541+
color: (
542+
'gray',
543+
200,
544+
),
545+
),
546+
531547
header-text-color: (
532548
contrast-color: (
533549
'gray',

packages/theming/sass/themes/schemas/components/light/_grid.scss

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
/// @prop {Number} header-border-width [1px] - The border width used for header borders.
1818
/// @prop {String} header-border-style [solid] - The border style used for header borders.
1919
/// @prop {Map} header-border-color [color: ('gray', 400)] - The color used for header borders.
20+
/// @prop {Map} action-border-color [color: ('gray', 400)] - The color used for action borders.
2021
/// @prop {Map} ghost-header-text-color [color: ('gray', 700)] - The dragged header text color.
2122
/// @prop {Map} ghost-header-icon-color [color: ('gray', 600)] - The dragged header icon color.
2223
/// @prop {Map} ghost-header-background [color: ('gray', 50)] - The dragged header background color.
@@ -179,6 +180,13 @@ $light-grid: extend(
179180
),
180181
),
181182

183+
action-border-color: (
184+
color: (
185+
'gray',
186+
400,
187+
),
188+
),
189+
182190
ghost-header-background: (
183191
color: (
184192
'gray',
@@ -839,6 +847,7 @@ $material-grid: extend(
839847
/// @prop {Map} header-selected-background [color: ('gray', 200)] - The table header background color when selected (ex. column selection).
840848
/// @prop {Map} header-selected-text-color [contrast-color: ('gray', 200)] - The table header text color when selected (ex. column selection).
841849
/// @prop {Map} header-border-color [color: ('gray', 300)] - The color used for header borders.
850+
/// @prop {Map} action-border-color [color: ('gray', 300)] - The color used for action borders.
842851
/// @prop {Map} row-selected-background [color: ('gray', 200)] - The selected row background color.
843852
/// @prop {Map} row-selected-hover-background [color: ('gray', 300)] - The selected row hover background.
844853
/// @prop {Map} body-column-selected-border-color [color: ('gray', 200)] - The border color used for the body column when in group-row state.
@@ -904,6 +913,13 @@ $fluent-grid: extend(
904913
),
905914
),
906915

916+
action-border-color: (
917+
color: (
918+
'gray',
919+
300,
920+
),
921+
),
922+
907923
row-border-color: (
908924
color: (
909925
'gray',
@@ -1226,6 +1242,7 @@ $bootstrap-grid: extend(
12261242
/// @prop {Map} header-selected-background [color: ('primary', 50)] - The table header background color when selected (ex. column selection).
12271243
/// @prop {Map} header-selected-text-color [color: 'gray', 900] - The table header text color when selected (ex. column selection).
12281244
/// @prop {Map} header-border-color [color: ('gray', 400)] - The color used for header borders.
1245+
/// @prop {Map} action-border-color [color: ('gray', 400)] - The color used for action borders.
12291246
/// @prop {Map} filtering-row-background [color: ('surface', 500)] - The background color of the filtering row.
12301247
/// @prop {Map} filtering-dialog-background [contrast-color: ('gray', 900)] - The background color of the advanced filtering dialog.
12311248
/// @prop {Map} edited-row-indicator [color: ('primary', 400)] - The indicator's color of edited row.
@@ -1330,6 +1347,13 @@ $indigo-grid: extend(
13301347
),
13311348
),
13321349

1350+
action-border-color: (
1351+
color: (
1352+
'gray',
1353+
400,
1354+
),
1355+
),
1356+
13331357
filtering-header-background: (
13341358
color: (
13351359
'gray',

0 commit comments

Comments
 (0)