Skip to content

Commit 87ca413

Browse files
committed
refactor: move font size overrides for SsoButton to standalone-mount.ts
- Removed inline CSS from SsoButton.ce.vue and added font size overrides in standalone-mount.ts for better organization and maintainability. - This change centralizes styling management for the SSO button component, improving clarity and reducing redundancy.
1 parent d048e95 commit 87ca413

2 files changed

Lines changed: 19 additions & 22 deletions

File tree

web/components/SsoButton.ce.vue

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,5 @@ import SsoButtons from './sso/SsoButtons.vue';
66
<SsoButtons />
77
</template>
88

9-
<style>
10-
/* Font size overrides for 16px base (standard Tailwind sizing) */
11-
:root {
12-
/* Text sizes - standard Tailwind rem values */
13-
--text-xs: 0.75rem; /* 12px */
14-
--text-sm: 0.875rem; /* 14px */
15-
--text-base: 1rem; /* 16px */
16-
--text-lg: 1.125rem; /* 18px */
17-
--text-xl: 1.25rem; /* 20px */
18-
--text-2xl: 1.5rem; /* 24px */
19-
--text-3xl: 1.875rem; /* 30px */
20-
--text-4xl: 2.25rem; /* 36px */
21-
--text-5xl: 3rem; /* 48px */
22-
--text-6xl: 3.75rem; /* 60px */
23-
--text-7xl: 4.5rem; /* 72px */
24-
--text-8xl: 6rem; /* 96px */
25-
--text-9xl: 8rem; /* 128px */
26-
27-
/* Spacing - standard Tailwind value */
28-
--spacing: 0.25rem; /* 4px */
29-
}
30-
</style>
9+
<!-- Font size overrides are handled in standalone-mount.ts for custom elements -->
10+

web/components/standalone-mount.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,23 @@ function injectPreRenderCSS() {
8383
unraid-api-key-authorize.unapi {
8484
opacity: 1;
8585
}
86+
87+
/* Font size overrides for SSO button component */
88+
unraid-sso-button {
89+
--text-xs: 0.75rem;
90+
--text-sm: 0.875rem;
91+
--text-base: 1rem;
92+
--text-lg: 1.125rem;
93+
--text-xl: 1.25rem;
94+
--text-2xl: 1.5rem;
95+
--text-3xl: 1.875rem;
96+
--text-4xl: 2.25rem;
97+
--text-5xl: 3rem;
98+
--text-6xl: 3.75rem;
99+
--text-7xl: 4.5rem;
100+
--text-8xl: 6rem;
101+
--text-9xl: 8rem;
102+
}
86103
`;
87104
document.head.appendChild(style);
88105
}

0 commit comments

Comments
 (0)