Back to Daisyui

daisyUI base style

packages/docs/src/routes/(routes)/docs/base/+page.md

5.5.192.4 KB
Original Source
<script> import Translate from "$components/Translate.svelte" </script>

These are the tiny base styles that daisyUI adds to your page. These styles are less than a kilobyte in total, so you don't need to worry about the size

NameDescription
propertiesFor necessary at-rules, like variable type for --radialprogress
rootcolorFor :root and [data-theme] it sets background-color to base-100 and text color to base-content
scrollbarSets scrollbar-color for :root
rootscrolllockSets :root to overflow: hidden when modal or drawer is open
rootscrollgutterAdds a scrollbar-gutter to :root when modal or drawer is open, to avoid layout shift
svgContains small SVG images for noise filter, chat bubble tail mask, and tooltip tail mask. Can be disabled to use custom images.

If you want to opt out of each part, you can do it by setting the exclude config.
For example, to opt out of the scrollbar-gutter and style, scrollbar-color, you can exclude it like this:

postcss
@plugin "daisyui" {
  exclude: rootscrollgutter, rootcolor;
}

Or if you're using CDN, you can disable it from your customized CDN file if you need to.

Source code