reconfigure css to allow consumer styling
It's a little jank, but it works. The consumer absolutely MUST have a file at `$lib/styles/tailwind.css` that contains all necessary tailwind imports AND also imports the `src/lib/styles/base.css` file from sui. WILL address this in another commit.
This commit is contained in:
@@ -1,3 +1,3 @@
|
|||||||
@import '$lib/styles/theme.css';
|
@import '$lib/styles/tailwind.css';
|
||||||
|
|
||||||
@custom-variant dark (&:where(.dark, .dark *));
|
@custom-variant dark (&:where(.dark, .dark *));
|
||||||
|
|||||||
@@ -462,7 +462,7 @@
|
|||||||
{/snippet}
|
{/snippet}
|
||||||
|
|
||||||
<style lang="postcss">
|
<style lang="postcss">
|
||||||
@reference "./styles/theme.css";
|
@reference "$lib/styles/tailwind.css";
|
||||||
|
|
||||||
.picker {
|
.picker {
|
||||||
--outer-gap: 0.5rem;
|
--outer-gap: 0.5rem;
|
||||||
|
|||||||
@@ -311,7 +311,7 @@
|
|||||||
{/snippet}
|
{/snippet}
|
||||||
|
|
||||||
<style lang="postcss">
|
<style lang="postcss">
|
||||||
@reference "./styles/theme.css";
|
@reference "$lib/styles/tailwind.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;
|
||||||
|
|||||||
@@ -435,7 +435,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style lang="postcss">
|
<style lang="postcss">
|
||||||
@reference "./styles/theme.css";
|
@reference "$lib/styles/tailwind.css";
|
||||||
|
|
||||||
:global(.circle-initial) {
|
:global(.circle-initial) {
|
||||||
transition: opacity 1s;
|
transition: opacity 1s;
|
||||||
|
|||||||
@@ -363,7 +363,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style lang="postcss">
|
<style lang="postcss">
|
||||||
@reference "./styles/theme.css";
|
@reference "$lib/styles/tailwind.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;
|
||||||
|
|||||||
@@ -1,12 +1,3 @@
|
|||||||
/* packages/ui/src/styles/theme.css */
|
|
||||||
@import 'tailwindcss';
|
|
||||||
|
|
||||||
@plugin '@tailwindcss/forms';
|
|
||||||
@plugin '@tailwindcss/container-queries';
|
|
||||||
@plugin 'tailwindcss-animate';
|
|
||||||
|
|
||||||
@custom-variant dark (&:where(.dark, .dark *));
|
|
||||||
|
|
||||||
@theme {
|
@theme {
|
||||||
/* Fonts - easily overrideable */
|
/* Fonts - easily overrideable */
|
||||||
--font-*: initial;
|
--font-*: initial;
|
||||||
@@ -93,13 +84,3 @@
|
|||||||
--transition-property-colors: background-color, border-color, color, fill, stroke;
|
--transition-property-colors: background-color, border-color, color, fill, stroke;
|
||||||
--transition-property-font-color: color;
|
--transition-property-font-color: color;
|
||||||
}
|
}
|
||||||
|
|
||||||
@layer base {
|
|
||||||
*,
|
|
||||||
::after,
|
|
||||||
::before,
|
|
||||||
::backdrop,
|
|
||||||
::file-selector-button {
|
|
||||||
border-color: var(--color-sui-gray-200, currentcolor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
18
src/lib/styles/tailwind.css
Normal file
18
src/lib/styles/tailwind.css
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
/* packages/ui/src/styles/tailwind.css */
|
||||||
|
@import 'tailwindcss';
|
||||||
|
@import '$lib/styles/base.css';
|
||||||
|
@plugin '@tailwindcss/forms';
|
||||||
|
@plugin '@tailwindcss/container-queries';
|
||||||
|
@plugin 'tailwindcss-animate';
|
||||||
|
|
||||||
|
@custom-variant dark (&:where(.dark, .dark *));
|
||||||
|
|
||||||
|
@layer base {
|
||||||
|
*,
|
||||||
|
::after,
|
||||||
|
::before,
|
||||||
|
::backdrop,
|
||||||
|
::file-selector-button {
|
||||||
|
border-color: var(--color-sui-gray-200, currentcolor);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -19,6 +19,8 @@
|
|||||||
let dateInputValue = $state<Date | undefined>(undefined);
|
let dateInputValue = $state<Date | undefined>(undefined);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<title>sui</title>
|
||||||
|
|
||||||
<h1 class="mb-4 text-3xl font-bold">sui — Opinionated Svelte 5 UI toolkit</h1>
|
<h1 class="mb-4 text-3xl font-bold">sui — Opinionated Svelte 5 UI toolkit</h1>
|
||||||
|
|
||||||
<p class="mb-4">
|
<p class="mb-4">
|
||||||
@@ -153,7 +155,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style lang="postcss">
|
<style lang="postcss">
|
||||||
@reference '$lib/styles/theme.css';
|
@reference '$lib/styles/tailwind.css';
|
||||||
|
|
||||||
.component .title {
|
.component .title {
|
||||||
@apply mb-2 text-lg font-semibold;
|
@apply mb-2 text-lg font-semibold;
|
||||||
|
|||||||
Reference in New Issue
Block a user