aboutsummaryrefslogtreecommitdiff
path: root/src/services/user_highlighter/user_highlighter.js
diff options
context:
space:
mode:
authorHJ <30-hj@users.noreply.git.pleroma.social>2021-09-09 21:51:39 +0000
committerHJ <30-hj@users.noreply.git.pleroma.social>2021-09-09 21:51:39 +0000
commit370f1e55adddd60a22bf56a7782ba61f239eb13c (patch)
tree3a4c897ac420b8d6ab92b31e2779f88947016eed /src/services/user_highlighter/user_highlighter.js
parentf35e3d0f3fc1a6bb4ebd77fba1dce0ac27f5b7d7 (diff)
parenta8a82ad12f2f7b9eb8fe7a57a3a7d503c6bbe2ed (diff)
Merge branch 'develop' into 'themeApply'
# Conflicts: # CHANGELOG.md
Diffstat (limited to 'src/services/user_highlighter/user_highlighter.js')
-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
}
}
}