From fe8ceca678bac84f7a2549700221b0594c829d62 Mon Sep 17 00:00:00 2001 From: bubblegump30 <49097353+bubblegump30@users.noreply.github.com> Date: Sat, 21 Nov 2026 07:27:40 -0330 Subject: [PATCH] Scope profile username spacing to extra content --- src/content/features/sitewide/cssfixes.js | 17 +++-------------- src/css/sitewide.scss | 17 +++++++++++++++++ 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/src/content/features/sitewide/cssfixes.js b/src/content/features/sitewide/cssfixes.js index 3b2fe0d4b..99451ba23 100644 --- a/src/content/features/sitewide/cssfixes.js +++ b/src/content/features/sitewide/cssfixes.js @@ -117,20 +117,9 @@ const applyGameTitleFix = () => { const applyProfileUsernameSpacingFix = (enabled) => { if (!enabled) return; - - const styleId = 'rovalra-profile-username-spacing-fix'; - if (document.getElementById(styleId)) return; - - const style = document.createElement('style'); - style.id = styleId; - style.textContent = ` - .user-profile-header-info > .flex.gap-medium.items-center.min-width-0 > .flex.flex-col.min-width-0 { - align-self: stretch; - box-sizing: border-box; - padding-block: 20px; - } - `; - (document.head || document.documentElement).appendChild(style); + document.documentElement.classList.add( + 'rovalra-profile-username-spacing-fix', + ); }; const applyThemeScrollbarFix = (enabled) => { diff --git a/src/css/sitewide.scss b/src/css/sitewide.scss index 75c5516dc..9be481b62 100644 --- a/src/css/sitewide.scss +++ b/src/css/sitewide.scss @@ -97,6 +97,23 @@ body:where(.dark-theme), color: inherit; } +:where(.rovalra-profile-username-spacing-fix) + .user-profile-header-info + > .flex.gap-medium.items-center.min-width-0 + > .flex.flex-col.min-width-0:where( + :has( + .rovalra-profile-views-pill, + .rovalra-profile-customization-pill, + .rovalra-profile-subplace-legacy-chip.rovalra-profile-subplace-ready, + .rovalra-profile-subplace-legacy-row.rovalra-profile-subplace-row-ready, + #reputationDiv + ) + ) { + align-self: stretch; + box-sizing: border-box; + padding-block: 20px; +} + .rovalra-canvas > canvas { border-radius: var(--radius-medium, 8px) !important; }