Skip to content

Commit

Permalink
feat: better dark theme for settings dialog
Browse files Browse the repository at this point in the history
- input calendar: follow to the current theme;
- better modal contrast.
  • Loading branch information
khmm12 committed Jun 24, 2024
1 parent a7bd97a commit 8dd0760
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/Modal/styles.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { css, type CSSProperties } from '@linaria/core'
import { darken, rgba } from 'polished'
import { black, dark1, lightGrey, white } from '@/theme/colors'
import { black, dark2, lightGrey, white } from '@/theme/colors'
import { darkScheme } from '@/theme/media'

const overlayBackground = (opacity = 1): CSSProperties => ({
Expand Down Expand Up @@ -53,8 +53,8 @@ export const dialog = css`
color: ${black};
@media ${darkScheme} {
background: ${dark1};
box-shadow: 0 0 0.8rem 0 ${rgba(white, 0.48)};
background: ${dark2};
box-shadow: 0 0 0.8rem 0 ${rgba(black, 0.6)};
color: ${white};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ export const input = css`
background: ${darken(0.85, white)};
border-color: ${white};
}
&[type='date'] {
color-scheme: light;
@media ${darkScheme} {
color-scheme: dark;
}
}
`

export const button = css`
Expand Down
1 change: 1 addition & 0 deletions src/theme/__snapshots__/theme.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ exports[`colors 1`] = `
{
"black": "#000000",
"dark1": "#202124",
"dark2": "#2c2c2c",
"lightGrey": "#eeeeee",
"white": "#ffffff",
}
Expand Down
1 change: 1 addition & 0 deletions src/theme/colors.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export const black = '#000000'
export const dark1 = '#202124'
export const dark2 = '#2c2c2c'
export const lightGrey = '#eeeeee'
export const white = '#ffffff'

0 comments on commit 8dd0760

Please sign in to comment.