Skip to content

Commit 288730c

Browse files
committed
feat: darken image
1 parent 30c28eb commit 288730c

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

gatsby-theme-oi-wiki/src/theme/global.js

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ const globalStyles = withStyles((theme) => ({
3737
},
3838
img: {
3939
maxWidth: '100%',
40+
filter: 'var(--image-filter)',
4041
},
4142
ol: {
4243
paddingInlineStart: 30,

gatsby-theme-oi-wiki/src/theme/index.js

+2
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ const lightCss = {
6666
'--link-default': hexToRgbaParam('#576ad4'),
6767
'--link-hover': hexToRgbaParam('#03a9f4'),
6868
'--highlight-filter': '',
69+
'--image-filter': '',
6970
'--inline-code-color': hexToRgbaParam('#37474f'),
7071
'--inline-code-background': '236, 236, 236, .5',
7172
...applyDefaults(lightColor, ...paletteKeys),
@@ -96,6 +97,7 @@ const darkCss = {
9697
'--link-default': hexToRgbaParam('#20baff'),
9798
'--link-hover': hexToRgbaParam('#52ebff'),
9899
'--highlight-filter': 'invert(98%) hue-rotate(180deg)',
100+
'--image-filter': 'brightness(0.8)',
99101
'--inline-code-color': hexToRgbaParam('#c4c4c4'),
100102
'--inline-code-background': hexToRgbaParam('#424242'),
101103
...applyDefaults(darkColor, ...paletteKeys),

0 commit comments

Comments
 (0)