-
Notifications
You must be signed in to change notification settings - Fork 0
Refresh Tailwind light theme #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| # Tailwind Theme (AudioSharp) | ||
|
|
||
| Reusable Tailwind v4 theme tokens and base styling. Includes shadcn-compatible CSS variables for easy parity with shadcn/lyra. | ||
|
|
||
| ## Usage (local repo) | ||
|
|
||
| In your Tailwind entry CSS: | ||
|
|
||
| ```css | ||
| @import "../packages/tailwind-theme/fonts.css"; | ||
| @import "tailwindcss"; | ||
| @import "../packages/tailwind-theme/theme.css"; | ||
| ``` | ||
|
|
||
| ## Usage (npm package) | ||
|
|
||
| 1) Publish this package or use `npm link`. | ||
| 2) Import after Tailwind: | ||
|
|
||
| ```css | ||
| @import "@audiosharp/tailwind-theme/fonts.css"; | ||
| @import "tailwindcss"; | ||
| @import "@audiosharp/tailwind-theme/theme.css"; | ||
| ``` | ||
|
|
||
| ## Notes | ||
|
|
||
| - Fonts are loaded from Google Fonts in `fonts.css` (Noto Sans). Skip that import if you already load fonts. | ||
| - shadcn tokens are defined on `:root` and `.dark`. | ||
| - `--radius` is set to `0px` to match the requested preset; override if you want rounded components. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| @import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;500;600;700&display=swap'); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| { | ||
| "name": "@audiosharp/tailwind-theme", | ||
| "version": "0.1.0", | ||
| "private": true, | ||
| "files": [ | ||
| "fonts.css", | ||
| "theme.css" | ||
| ], | ||
| "exports": { | ||
| "./fonts.css": "./fonts.css", | ||
| "./theme.css": "./theme.css" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,162 @@ | ||||||
| @theme { | ||||||
| --font-sans: "Noto Sans", "Segoe UI", system-ui, sans-serif; | ||||||
| --font-display: "Noto Sans", "Segoe UI", system-ui, sans-serif; | ||||||
| --font-mono: "Noto Sans", "Segoe UI", system-ui, sans-serif; | ||||||
|
||||||
| --font-mono: "Noto Sans", "Segoe UI", system-ui, sans-serif; | |
| --font-mono: "JetBrains Mono", "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The .dark selector is included with :root and is being assigned light theme variables, including color-scheme: light. This will cause incorrect styling if a dark theme is ever introduced, and it forces light-mode native UI elements (like scrollbars) even when the .dark class is applied. It's better to remove .dark from this rule-set for now to avoid confusion and future bugs. A separate .dark block should be created when the dark theme is actually implemented.
:root {
Copilot
AI
Jan 15, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The markup uses rounded utility classes like rounded-full, rounded-2xl, and rounded-card throughout, but these are all overridden to border-radius: 0 in the theme.css utilities layer (lines 110-121). While this achieves the desired "no-radius" design, it creates a maintainability concern where the class names don't reflect the actual styling. Consider either: 1) removing the rounded classes from the markup since they have no effect, or 2) using a different approach like setting all radius custom properties to 0 without overriding the utility classes, so the intent is clearer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These overrides force all Tailwind rounded-* utility classes to have a border-radius of 0. While the goal is a "no-radius default", this implementation is too aggressive and makes it impossible to use rounded corners with Tailwind's utility classes. Several components in this PR use classes like rounded-2xl, rounded-full, and rounded-card (e.g., in MainLayout.razor, TelemetryPanel.razor, Home.razor), but this override will render them ineffective, which is likely not the intention.
A better approach for a "no-radius default" is to rely on the CSS variables for radius that are already defined for shadcn compatibility (lines 56-62). Components can use these variables, and they can be overridden when needed.
Please remove this entire block of overrides to allow Tailwind's rounded-* utilities to work as expected.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,20 @@ | ||
| @inherits LayoutComponentBase | ||
|
|
||
| <div class="page"> | ||
| <div class="sidebar"> | ||
| <NavMenu /> | ||
| </div> | ||
|
|
||
| <div class="relative z-10 min-h-screen"> | ||
| <NavMenu /> | ||
| <main> | ||
| <article class="content px-4 py-4"> | ||
| <article class="mx-auto w-full max-w-6xl px-5 pb-16 pt-8 sm:px-8 lg:px-12"> | ||
| @Body | ||
| </article> | ||
| </main> | ||
| </div> | ||
|
|
||
| <div id="blazor-error-ui" data-nosnippet> | ||
| An unhandled error has occurred. | ||
| <a href="." class="reload">Reload</a> | ||
| <span class="dismiss">🗙</span> | ||
| <div id="blazor-error-ui" | ||
| data-nosnippet | ||
| class="fixed bottom-4 left-4 right-4 z-50 hidden rounded-2xl border border-brand-300/40 bg-brand-500/10 px-4 py-3 text-sm font-semibold text-ink-900 shadow-lg sm:left-auto sm:right-6 sm:w-auto"> | ||
| <div class="flex items-center gap-3"> | ||
| <span>An unhandled error has occurred.</span> | ||
| <a href="." class="reload underline decoration-brand-300/70 underline-offset-4">Reload</a> | ||
| <span class="dismiss ml-auto cursor-pointer text-brand-300">🗙</span> | ||
| </div> | ||
| </div> |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The package is marked as
private, which prevents it from being published to an npm registry. TheREADME.mdfile mentions publishing as a usage option. If this package is intended to be published,"private": trueshould be removed or set tofalse.