clean up consumer styling

Consumer now only imports the styles endpoint from their main CSS file.
Dark mode is currently permanently disabled, I need to add a JS helper
that when used automatically adds the correct class if there is a
preferred color scheme.

Also gets rid of the whole weird thing where the consumer had to have
a SPECIFIC `theme.css` file.
This commit is contained in:
Elijah Duffy
2025-07-03 21:17:49 -07:00
parent 9e6834eaba
commit 4ce40a55fd
8 changed files with 10 additions and 8 deletions

View File

@@ -26,7 +26,8 @@
".": { ".": {
"types": "./src/lib/index.ts", "types": "./src/lib/index.ts",
"svelte": "./src/lib/index.ts" "svelte": "./src/lib/index.ts"
} },
"./styles": "./src/lib/styles/base.css"
}, },
"peerDependencies": { "peerDependencies": {
"@sveltejs/kit": "^2.20.2", "@sveltejs/kit": "^2.20.2",

View File

@@ -462,7 +462,7 @@
{/snippet} {/snippet}
<style lang="postcss"> <style lang="postcss">
@reference "$lib/styles/tailwind.css"; @reference "./styles/reference.css";
.picker { .picker {
--outer-gap: 0.5rem; --outer-gap: 0.5rem;

View File

@@ -311,7 +311,7 @@
{/snippet} {/snippet}
<style lang="postcss"> <style lang="postcss">
@reference "$lib/styles/tailwind.css"; @reference "./styles/reference.css";
.date-input { .date-input {
@apply ring-sui-accent dark:ring-sui-accent/50 h-6 min-w-[1ch] outline-0 transition-all focus:ring-2; @apply ring-sui-accent dark:ring-sui-accent/50 h-6 min-w-[1ch] outline-0 transition-all focus:ring-2;

View File

@@ -435,7 +435,7 @@
</div> </div>
<style lang="postcss"> <style lang="postcss">
@reference "$lib/styles/tailwind.css"; @reference "./styles/reference.css";
:global(.circle-initial) { :global(.circle-initial) {
transition: opacity 1s; transition: opacity 1s;

View File

@@ -363,7 +363,7 @@
</div> </div>
<style lang="postcss"> <style lang="postcss">
@reference "$lib/styles/tailwind.css"; @reference "./styles/reference.css";
:global(.time-input) { :global(.time-input) {
@apply h-16 w-24 text-center text-xl; @apply h-16 w-24 text-center text-xl;

View File

@@ -1,3 +1,5 @@
@custom-variant dark (&:where(.dark, .dark *));
@theme { @theme {
/* Fonts - easily overrideable */ /* Fonts - easily overrideable */
--font-*: initial; --font-*: initial;

View File

@@ -0,0 +1,2 @@
@import 'tailwindcss';
@import './base.css';

View File

@@ -1,12 +1,9 @@
/* packages/ui/src/styles/tailwind.css */
@import 'tailwindcss'; @import 'tailwindcss';
@import '$lib/styles/base.css'; @import '$lib/styles/base.css';
@plugin '@tailwindcss/forms'; @plugin '@tailwindcss/forms';
@plugin '@tailwindcss/container-queries'; @plugin '@tailwindcss/container-queries';
@plugin 'tailwindcss-animate'; @plugin 'tailwindcss-animate';
@custom-variant dark (&:where(.dark, .dark *));
@layer base { @layer base {
*, *,
::after, ::after,