# Styling and Theming

The project uses:

* **Tailwind CSS** — Utility classes for quick styling
* **SCSS Modules** — For component-specific styles
* **CSS variables** — For theming colors and spacing

**Dark mode**

Theme is managed globally in [`app/contexts/themeContext.tsx`](https://github.com/betterbugs/dev-tools/blob/main/app/contexts/themeContext.tsx). Components automatically adapt to dark/light mode through CSS variables in [`app/styles/variables.scss`](https://github.com/betterbugs/dev-tools/blob/main/app/styles/variables.scss).

When styling, use Tailwind's dark mode support:

```jsx
<div className="bg-white dark:bg-gray-900">
```

**Component styles**

For component-specific styles, use SCSS modules:

```jsx
import styles from "./MyTool.module.scss";

export default () => (
  <div className={styles.container}>
    ...
  </div>
);
```

**Global styles**

Global styles are in [`app/styles/global.scss`](https://github.com/betterbugs/dev-tools/blob/main/app/styles/global.scss). Only add global styles if they affect the entire app. Keep most styling in component-level modules or Tailwind.

**Design consistency**

Look at existing tools to match:

* Colors and spacing
* Input field styles
* Button sizes and shapes
* Typography (headings, labels, hints)

Use the same color, not slightly different shades. Consistency > customization.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.betterbugs.io/contributing-to-betterbugs/design-of-our-code/styling-and-theming.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
