Skip to content

Commit 4d1e12e

Browse files
committed
docs: add FAQ
1 parent 843d7a0 commit 4d1e12e

3 files changed

Lines changed: 34 additions & 1 deletion

File tree

packages/docs/src/components/Footer.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
<a href="/blog/" class="link link-hover">{$t("Blog")}</a>
7878
<a href="/resources/" class="link link-hover">{$t("Resources")}</a>
7979
<a href="/store/" class="link link-hover">{$t("Store")}</a>
80+
<a href="/docs/faq/" class="link link-hover">{$t("FAQ")}</a>
8081
</div>
8182
<div>
8283
<span class="footer-title opacity-70">{$t("available-on")}</span>

packages/docs/src/lib/data/roadmap.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,8 @@
211211
done: true
212212
- title: New Theme generator
213213
done: true
214+
- title: New logo
215+
done: false
214216
- title: Homepage redesign
215217
done: false
216218
- title: Add missing translations
@@ -220,7 +222,7 @@
220222
- title: Add component accessibility guidelines
221223
done: false
222224
- title: Add FAQ to the site
223-
done: false
225+
done: true
224226
- title: Add integrations tutorial for third-party JS packages
225227
done: false
226228
- title: Improve the loading of translation files
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
title: FAQ
3+
desc: Frequently Asked Questions – Common problems and how to fix
4+
---
5+
6+
<script>
7+
import Translate from "$components/Translate.svelte"
8+
</script>
9+
10+
## Class names are not working
11+
- Make sure you're not using [dynamic class names](https://tailwindcss.com/docs/detecting-classes-in-source-files#dynamic-class-names) (half-variable like `btn-{$color}`). If you do this, there is no way for Tailwind CSS to find your class names.
12+
- Try using `@source` [Explicitly register sources](https://tailwindcss.com/docs/detecting-classes-in-source-files#explicitly-registering-sources)
13+
14+
## CSS files is too big
15+
Using Tailwind CSS and daisyUI, it is expected for CSS files to be very small. Ideally only the class names you used must be in the CSS file. Sometimes (specially in monorepos) it is possible that [Tailwind CSS automatic class name detection](https://tailwindcss.com/docs/detecting-classes-in-source-files) finds some unwanted strings in your project and generate styles for them. To avoid this, you can [disable automatic detection](https://tailwindcss.com/docs/detecting-classes-in-source-files#disabling-automatic-detection) and register your source files using `@source` directive.
16+
17+
## checkbox/toggle/radio styles are broken
18+
Probably you're using `@tailwindcss/forms` (or another style or plugin) that is affecting form elements.
19+
daisyUI applies styles to class names but `@tailwindcss/forms` by default, applies styles to all form elements.
20+
If you really need `@tailwindcss/forms` alongside with daisyUI (which I doubt, because both are doing the same job) consider using its [`strategy: 'class'` config](https://github.com/tailwindlabs/tailwindcss-forms#using-only-global-styles-or-only-classes) so it only applies style to the elements with specific class name (not all form elements)
21+
22+
## Themes are not working
23+
- [Add the themes you want](https://daisyui.com/docs/themes/#enable-a-built-in-theme)
24+
- Enable a theme using [`data-theme`](https://daisyui.com/docs/themes/#enable-a-built-in-theme) on your `<html>` tag:
25+
- If you're using a custom theme make sure you're using [all the required CSS variables](https://daisyui.com/docs/themes/#-2)
26+
27+
## Tailwind's `dark:` prefix is not working
28+
With daisyUI, you don't need to manually set colors using [`dark:` variant](https://daisyui.com/docs/colors/)
29+
As long as you use [daisyUI colors](https://daisyui.com/docs/colors/) they will work on all themes, light or dark.
30+
If you really want to use Tailwind's `dark:` variant, [here's how to do it](https://daisyui.com/docs/themes/#-5).

0 commit comments

Comments
 (0)