···11+# Styling the Chilp widget
22+33+## With DaisyUI
44+55+Chilp v2 or newer does not inline it's own CSS, but instead comes with [DaisyUI](https://daisyui.com/)-compatible classes, this means you can optimally have Chilp adapted to your own site's theme.
66+77+Do note, Tailwind may need to be pointed to the classes Chilp uses, so make sure to either source it on the `./dist` folder AFTER build, or
88+```css
99+@import "tailwindcss";
1010+@plugin "daisyui";
1111+@source "./build/packages/chilp/src/chilp/widget.gleam";
1212+```
1313+```
1414+```
1515+1616+Try something like the above. You could of course also point to the `build/dev/javascript`, especially if you work with a path dependency (in which case the `widget.gleam` file won't be in `./build/`).
1717+1818+## Styling with OatUI
1919+2020+[Oat](https://oat.ink/) is an ultra-lightweight HTML + CSS, semantic UI component library with no framework, build, or other dependencies. OatUI can style most of Chilp out of the box without even including it's javascript. Chilp applies mostly semantic HTML and has some extra attributes added for enhanced compatibility with Oat.
2121+2222+Some things that Oat can't style, need a slight bit of manual CSS'ing:
2323+```css
2424+.chilp-oat-enhance-hide {
2525+ display: none;
2626+}
2727+2828+.chilp-oat-enhance-inset-2em {
2929+ padding-inline-start: 2em;
3030+}
3131+3232+.chilp-oat-enhance-inset-1em {
3333+ padding-inline-start: 1em;
3434+}
3535+3636+.chilp-oat-enhance-inset-quoteblock {
3737+ border-left: 1px solid;
3838+ padding-inline-start: 1.5em;
3939+}
4040+4141+.chilp-oat-enhance-inset-blueskyreply,
4242+.chilp-oat-enhance-inset-witchskyreply,
4343+.chilp-oat-enhance-inset-blackskyreply {
4444+ /* We reset an oat-set value here. */
4545+ gap: unset !important;
4646+}
4747+4848+.chilp-oat-enhance-inset-blueskyreply {
4949+ color: rgb(0, 106, 255);
5050+ background-color: white;
5151+5252+ &::after {
5353+ content: "luesky";
5454+ }
5555+}
5656+5757+.chilp-oat-enhance-inset-blackskyreply {
5858+ color: white;
5959+ background-color: black;
6060+6161+ &::after {
6262+ content: "lacksky";
6363+ }
6464+}
6565+6666+.chilp-oat-enhance-inset-witchskyreply {
6767+ color: white;
6868+ background-color: rgb(237, 83, 69);
6969+7070+ &::after {
7171+ content: "itchsky";
7272+ }
7373+}
7474+7575+```
7676+7777+But with this, Oat can fully style Chilp widgets as well!
7878+7979+## Vanilla CSS
8080+8181+If you'd like to not use DaisyUI or OatUI, styling the widget yourself is very viable, all elements are queryable using css classes.
8282+8383+There is also an [example of DaisyUI output](https://tangled.org/strawmelonjuice.com/chilp/blob/main/docs/basic.css) sourced merely off the widget, with no theme or colourscheme information included, this is a 'basic default'.
8484+You should probably not embed that file. TailwindCSS/DaisyUI normally runs over a whole site and can optimise the css quite well, but because this css is generated purely off one component, it'll be massive if put together with your own styles. It'll contain CSS you won't need. And it won't style well on all sites, as it is scoped to not spill out to your site (`:root` and `:host` are for example removed, and the entire file is scoped to the `comment-widget`-class).
8585+But you _can_ embed that file if you're just testing out things, and may use it as reference when you write your own CSS for the widget. I bet your CSS will make it look way more awesome!
8686+