You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
daisyUI 4.10.2 with Tailwind v3.4.3, Svelte 4 (latest) and is installed as per daisyUI's instructions. I used pnpm to install.
Svelte works, Tailwind CSS works, daisy CSS partially works (buttons, tables, dark or light themes in daisyUI all look great).
What doesn't work is h1-h5, p, ul and such "basic" stuff - it's removed (or not applied) somewhere.
If I look with Firefox "inspect" tool, that takes me to inline style sheets (from Tailwind CSS, I assume) and there's Remove the default font size and weight for headings. - if I delete h1-h3, these headings become good.
Another thing that works is unchecking these.
If I also remove the styles listed below Removes the default spacing and border for appropriate elements in the same inline style document, then p and spacing also become good.
It seems the usual TailwindCSS behavior, but I don't understand what's stripping formatting from these styles and how to fix that.
I've just spent 12 hours rechecking everything multiple times including the FAQs twice. I have base: true and styled: true in tailwind.config.js.
I suspect I may have some wrong imports (I checked and removed all in-page styles) in pages I moved over from the same TCSS site without daisyU, but even new empty pages have the same problem
Tailwind CSS config:
exportdefault{content: ['./src/**/*.{svelte,js,ts}','./src/*.{svelte,js,ts}'],theme: {extend: {},},plugins: [require("@tailwindcss/typography"),require('daisyui')],daisyui: {themes: ["dracula","nord"],// false: only light + dark | true: all themes | array: specific themes like this ["light", "dark", "cupcake"]darkTheme: "dracula",// name of one of the included themes for dark modebase: true,// applies background color and foreground color for root element by defaultstyled: true,// include daisyUI colors and design decisions for all componentsutils: true,// adds responsive and modifier utility classesprefix: "",// prefix for daisyUI classnames (components, modifiers and responsive class names. Not colors)logs: true,// Shows info about daisyUI version and used config in the console when building your CSSthemeRoot: ":root",// The element that receives theme color CSS variables},}
Svelte config:
importadapterfrom'@sveltejs/adapter-cloudflare';import{vitePreprocess}from'@sveltejs/vite-plugin-svelte';/** @type {import('@sveltejs/kit').Config} */constconfig={preprocess: vitePreprocess(),kit: {// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.// If your environment is not supported or you settled on a specific environment, switch out the adapter.// See https://kit.svelte.dev/docs/adapters for more information about adapters.adapter: adapter()}};exportdefaultconfig;
/src/route/app.css (one part I'm not sure is if I should import it - it's not mentioned in daisyUI instructions, but maybe it's "common sense"):
Edit: I later stumbled across <div class="prose"> in one of the GH issues here and tried it. Now I surround my every page's content with that. I'd still like to know if that's how it's really supposed to be done, but I can move on for now.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
daisyUI 4.10.2 with Tailwind v3.4.3, Svelte 4 (latest) and is installed as per daisyUI's instructions. I used
pnpm
to install.Svelte works, Tailwind CSS works, daisy CSS partially works (buttons, tables, dark or light themes in daisyUI all look great).
What doesn't work is
h1-h5
,p
,ul
and such "basic" stuff - it's removed (or not applied) somewhere.If I look with Firefox "inspect" tool, that takes me to inline style sheets (from Tailwind CSS, I assume) and there's
Remove the default font size and weight for headings.
- if I delete h1-h3, these headings become good.Another thing that works is unchecking these.
If I also remove the styles listed below
Removes the default spacing and border for appropriate elements
in the same inline style document, thenp
and spacing also become good.It seems the usual TailwindCSS behavior, but I don't understand what's stripping formatting from these styles and how to fix that.
I've just spent 12 hours rechecking everything multiple times including the FAQs twice. I have
base: true
andstyled: true
in tailwind.config.js.I suspect I may have some wrong imports (I checked and removed all in-page styles) in pages I moved over from the same TCSS site without daisyU, but even new empty pages have the same problem
Edit: I later stumbled across
<div class="prose">
in one of the GH issues here and tried it. Now I surround my every page's content with that. I'd still like to know if that's how it's really supposed to be done, but I can move on for now.Beta Was this translation helpful? Give feedback.
All reactions