aboutsummaryrefslogtreecommitdiff
path: root/src/services
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2021-06-07 23:42:04 +0300
committerHenry Jameson <me@hjkos.com>2021-06-07 23:42:04 +0300
commit7d6fc044fbcf2c6f82f759605a0fd5c1aebae55a (patch)
tree7e8e15ddf460402b6c9555c7815297a5a9375d99 /src/services
parent6199788f28a2665388427f6e7737f15cebd5102d (diff)
new mentions look
Diffstat (limited to 'src/services')
-rw-r--r--src/services/user_highlighter/user_highlighter.js14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/services/user_highlighter/user_highlighter.js b/src/services/user_highlighter/user_highlighter.js
index b91c0f78..3b07592e 100644
--- a/src/services/user_highlighter/user_highlighter.js
+++ b/src/services/user_highlighter/user_highlighter.js
@@ -8,6 +8,11 @@ const highlightStyle = (prefs) => {
const solidColor = `rgb(${Math.floor(rgb.r)}, ${Math.floor(rgb.g)}, ${Math.floor(rgb.b)})`
const tintColor = `rgba(${Math.floor(rgb.r)}, ${Math.floor(rgb.g)}, ${Math.floor(rgb.b)}, .1)`
const tintColor2 = `rgba(${Math.floor(rgb.r)}, ${Math.floor(rgb.g)}, ${Math.floor(rgb.b)}, .2)`
+ const customProps = {
+ '--____highlight-solidColor': solidColor,
+ '--____highlight-tintColor': tintColor,
+ '--____highlight-tintColor2': tintColor2
+ }
if (type === 'striped') {
return {
backgroundImage: [
@@ -17,11 +22,13 @@ const highlightStyle = (prefs) => {
`${tintColor2} 20px,`,
`${tintColor2} 40px`
].join(' '),
- backgroundPosition: '0 0'
+ backgroundPosition: '0 0',
+ ...customProps
}
} else if (type === 'solid') {
return {
- backgroundColor: tintColor2
+ backgroundColor: tintColor2,
+ ...customProps
}
} else if (type === 'side') {
return {
@@ -31,7 +38,8 @@ const highlightStyle = (prefs) => {
`${solidColor} 2px,`,
`transparent 6px`
].join(' '),
- backgroundPosition: '0 0'
+ backgroundPosition: '0 0',
+ ...customProps
}
}
}