Skip to content

Commit f74cdb9

Browse files
committed
Update components to use tailwind references
1 parent 5e03cdd commit f74cdb9

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

src/lib/modules/modals/ModalContainer.svelte

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@
112112
</dialog>
113113

114114
<style>
115+
@reference "tailwindcss/theme";
116+
115117
:root:has(:is(.modal-open, .modal:target, .modal-toggle:checked + .modal, .modal[open])) {
116118
overflow: hidden;
117119
scrollbar-gutter: unset !important;

src/lib/modules/navigation/SideNavbar.svelte

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@
5656
</div>
5757

5858
<style>
59+
@reference "tailwindcss/theme";
60+
5961
:global {
6062
.menu-entry:hover {
6163
@apply rounded-md cursor-pointer;

src/routes/install/+page.svelte

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@
101101
<ComponentPageHeader title="Tailwind Setup" level="2"></ComponentPageHeader>
102102

103103
To use the components with Tailwind CSS, you obviously need to have Tailwind CSS installed. Since
104-
svelte (and sveltekit) strip out unused CSS, you need to add the following to your
105-
tailwind.config.js content array: <br />
106-
<pre>{`"node_modules/@smallstack/svelte-ui/dist/**/*.{html,svelte,js,ts}"`}</pre>
104+
Tailwind CSS strips out unused CSS, you need to add the following to your css file:
105+
<br />
106+
<pre>{`@import "tailwindcss";
107+
@source "../node_modules/@smallstack/svelte-ui"; // <-- this is the important line
108+
@plugin "daisyui";`}</pre>
107109
</div>

0 commit comments

Comments
 (0)