Skip to content

Commit

Permalink
Merge pull request #904 from OI-wiki/dark-filter
Browse files Browse the repository at this point in the history
feat: darken image
  • Loading branch information
Enter-tainer authored Jul 12, 2021
2 parents 1bbe385 + d34dcfb commit 2f34d46
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions gatsby-theme-oi-wiki/src/theme/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const globalStyles = withStyles((theme) => ({
},
img: {
maxWidth: '100%',
filter: 'var(--image-filter)',
},
ol: {
paddingInlineStart: 30,
Expand Down
2 changes: 2 additions & 0 deletions gatsby-theme-oi-wiki/src/theme/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ const lightCss = {
'--link-default': hexToRgbaParam('#576ad4'),
'--link-hover': hexToRgbaParam('#03a9f4'),
'--highlight-filter': '',
'--image-filter': '',
'--inline-code-color': hexToRgbaParam('#37474f'),
'--inline-code-background': '236, 236, 236, .5',
...applyDefaults(lightColor, ...paletteKeys),
Expand Down Expand Up @@ -96,6 +97,7 @@ const darkCss = {
'--link-default': hexToRgbaParam('#20baff'),
'--link-hover': hexToRgbaParam('#52ebff'),
'--highlight-filter': 'invert(98%) hue-rotate(180deg)',
'--image-filter': 'brightness(0.8)',
'--inline-code-color': hexToRgbaParam('#c4c4c4'),
'--inline-code-background': hexToRgbaParam('#424242'),
...applyDefaults(darkColor, ...paletteKeys),
Expand Down

0 comments on commit 2f34d46

Please sign in to comment.