Skip to content

Commit

Permalink
update surface colors for data table (#2347)
Browse files Browse the repository at this point in the history
Co-authored-by: Dan Rosenthal <[email protected]>
  • Loading branch information
tmlayton and danrosenthal authored Oct 28, 2019
1 parent bb0eaf0 commit 2541f9c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/components/DataTable/DataTable.scss
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ $breakpoint: 768px;
.TableRow {
&:hover .Cell {
@include breakpoint-after($breakpoint) {
background: color('sky', 'lighter');
background: var(--p-surface-hovered, color('sky', 'lighter'));
}
}
}
Expand Down Expand Up @@ -151,7 +151,7 @@ $breakpoint: 768px;

.Cell-total {
@include text-emphasis-strong;
background: color('sky', 'lighter');
background: var(--p-surface-foreground-subdued, color('sky', 'lighter'));
border-bottom: border();
}

Expand All @@ -162,7 +162,7 @@ $breakpoint: 768px;

.Footer {
padding: spacing();
background: color('sky', 'light');
color: color('ink', 'lighter');
background: var(--p-surface-foreground-subdued, color('sky', 'light'));
color: var(--p-text-subdued-on-surface, color('ink', 'lighter'));
text-align: center;
}
6 changes: 3 additions & 3 deletions src/utilities/theme/tests/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ describe('buildCustomProperties', () => {
'--p-surface': 'hsl(0, 0%, 100%, 1)',
'--p-surface-background': 'hsl(0, 0%, 98%, 1)',
'--p-surface-foreground': 'hsl(0, 0%, 100%, 1)',
'--p-surface-foreground-subdued': 'hsl(0, 0%, 90%, 1)',
'--p-surface-foreground-subdued': 'hsl(0, 0%, 95%, 1)',
'--p-surface-inverse': 'hsl(0, 0%, 0%, 1)',
'--p-surface-hovered': 'hsl(0, 0%, 93%, 1)',
'--p-surface-pressed': 'hsl(0, 0%, 86%, 1)',
Expand All @@ -99,7 +99,7 @@ describe('buildColors', () => {
'--p-surface': 'hsl(0, 0%, 98%, 1)',
'--p-surface-background': 'hsl(0, 0%, 98%, 1)',
'--p-surface-foreground': 'hsl(0, 0%, 100%, 1)',
'--p-surface-foreground-subdued': 'hsl(0, 0%, 90%, 1)',
'--p-surface-foreground-subdued': 'hsl(0, 0%, 95%, 1)',
'--p-surface-inverse': 'hsl(0, 0%, 0%, 1)',
'--p-surface-hovered': 'hsl(0, 0%, 93%, 1)',
'--p-surface-pressed': 'hsl(0, 0%, 86%, 1)',
Expand All @@ -115,7 +115,7 @@ describe('buildColors', () => {
'--p-surface': 'hsl(0, 0%, 100%, 1)',
'--p-surface-background': 'hsl(0, 0%, 98%, 1)',
'--p-surface-foreground': 'hsl(0, 0%, 100%, 1)',
'--p-surface-foreground-subdued': 'hsl(0, 0%, 90%, 1)',
'--p-surface-foreground-subdued': 'hsl(0, 0%, 95%, 1)',
'--p-surface-inverse': 'hsl(0, 0%, 0%, 1)',
'--p-surface-hovered': 'hsl(0, 0%, 93%, 1)',
'--p-surface-pressed': 'hsl(0, 0%, 86%, 1)',
Expand Down
2 changes: 1 addition & 1 deletion src/utilities/theme/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function surfaceColors(color: HSLAColor, lightSurface: boolean) {
surface: color,
surfaceBackground: setLightness(color, lightSurface ? 98 : 7),
surfaceForeground: setLightness(color, lightSurface ? 100 : 13),
surfaceForegroundSubdued: setLightness(color, lightSurface ? 90 : 10),
surfaceForegroundSubdued: setLightness(color, lightSurface ? 95 : 10),
surfaceInverse: setLightness(color, lightSurface ? 0 : 100),
surfaceHovered: setLightness(color, lightSurface ? 93 : 20),
surfacePressed: setLightness(color, lightSurface ? 86 : 27),
Expand Down

0 comments on commit 2541f9c

Please sign in to comment.