logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://hacktivis.me/git/pleroma-fe.git
commit: 8e3637c0596f544d2e32b8f9608fb37226265a4d
parent 39eee4412fc6af675c019c829216031e66f74d04
Author: Henry Jameson <me@hjkos.com>
Date:   Wed, 28 Feb 2024 14:57:19 +0200

improve scrollbars, add avatar to menu-item since it appears in
autocomplete, add wallpaper color

Diffstat:

Msrc/App.scss37++++++++++++++++++++++++++++---------
Msrc/components/menu_item.style.js3++-
Msrc/components/root.style.js4+++-
Msrc/components/scrollbar.style.js2+-
Msrc/services/style_setter/style_setter.js2++
5 files changed, 36 insertions(+), 12 deletions(-)

diff --git a/src/App.scss b/src/App.scss @@ -41,12 +41,31 @@ body { // have a cursor/pointer to operate them @media (any-pointer: fine) { * { - scrollbar-color: var(--btn) transparent; + scrollbar-color: var(--fg) transparent; &::-webkit-scrollbar { background: transparent; } + &::-webkit-scrollbar-corner { + background: transparent; + } + + &::-webkit-resizer { + /* stylelint-disable-next-line declaration-no-important */ + background-color: transparent !important; + background-image: + linear-gradient( + 135deg, + transparent calc(50% - 1px), + var(--textFaint) 50%, + transparent calc(50% + 1px), + transparent calc(75% - 1px), + var(--textFaint) 75%, + transparent calc(75% + 1px), + ); + } + &::-webkit-scrollbar-button, &::-webkit-scrollbar-thumb { box-shadow: var(--shadow); @@ -67,15 +86,15 @@ body { &:increment { background-image: - linear-gradient(45deg, var(--text) 50%, transparent 51%), - linear-gradient(-45deg, transparent 50%, var(--text) 51%); + linear-gradient(45deg, var(--text) 50%, transparent calc(50% + 1px)), + linear-gradient(-45deg, transparent 50%, var(--text) calc(50% + 1px)); background-position: top var(--___bgPadding) left 50%, right 50% bottom var(--___bgPadding); } &:decrement { background-image: - linear-gradient(45deg, transparent 50%, var(--text) 51%), - linear-gradient(-45deg, var(--text) 50%, transparent 51%); + linear-gradient(45deg, transparent 50%, var(--text) calc(50% + 1px)), + linear-gradient(-45deg, var(--text) 50%, transparent calc(50% + 1px)); background-position: bottom var(--___bgPadding) right 50%, left 50% top var(--___bgPadding); } } @@ -85,15 +104,15 @@ body { &:increment { background-image: - linear-gradient(-45deg, transparent 50%, var(--text) 51%), - linear-gradient(45deg, transparent 50%, var(--text) 51%); + linear-gradient(-45deg, transparent 50%, var(--text) calc(50% + 1px)), + linear-gradient(45deg, transparent 50%, var(--text) calc(50% + 1px)); background-position: right var(--___bgPadding) top 50%, left var(--___bgPadding) top 50%; } &:decrement { background-image: - linear-gradient(-45deg, var(--text) 50%, transparent 51%), - linear-gradient(45deg, var(--text) 50%, transparent 51%); + linear-gradient(-45deg, var(--text) 50%, transparent calc(50% + 1px)), + linear-gradient(45deg, var(--text) 50%, transparent calc(50% + 1px)); background-position: left var(--___bgPadding) top 50%, right var(--___bgPadding) top 50%; } } diff --git a/src/components/menu_item.style.js b/src/components/menu_item.style.js @@ -7,7 +7,8 @@ export default { 'Input', 'Border', 'ButtonUnstyled', - 'Badge' + 'Badge', + 'Avatar' ], states: { hover: ':hover', diff --git a/src/components/root.style.js b/src/components/root.style.js @@ -16,7 +16,9 @@ export default { { directives: { '--font': 'generic | sans-serif', - '--monoFont': 'generic | monospace' + '--monoFont': 'generic | monospace', + '--bg': 'color | #000000', // just to establish order + '--wallpaper': 'color | --bg, -2' } } ] diff --git a/src/components/scrollbar.style.js b/src/components/scrollbar.style.js @@ -4,7 +4,7 @@ export default { defaultRules: [ { directives: { - background: '--bg' + background: '--wallpaper' } } ] diff --git a/src/services/style_setter/style_setter.js b/src/services/style_setter/style_setter.js @@ -33,6 +33,8 @@ export const applyTheme = async (input) => { parts[0], ', ', parts[0].replace(/button/, 'thumb'), + ', ', + parts[0].replace(/scrollbar-button/, 'resizer'), ' {', parts[1], '}'