# `AshUi.Theme.VSCode`
[🔗](https://github.com/hyperbob-labs/ash_ui/blob/main/lib/ash_ui/theme/vs_code.ex#L1)

Build-side stylesheet GENERATOR for VS Code color-theme JSON (DESIGN.md §9).

Theme JSON goes in, CSS text comes out: VS Code webview-compatible custom
properties (`--vscode-*`), a small `[part=...]` mapping for VS Code-style lists, side bars, panels and inputs, and
TextMate scope CSS. WCAG contrast gates apply at generation time.

This module does not participate in rendering. Write the generated CSS to a
file BEFORE the resources declaring it compile, then declare it like any
stylesheet:

    css = AshUi.Theme.VSCode.stylesheet_from_file!("priv/themes/dark.json")
    File.write!("assets/css/theme.css", css)

    ash_ui do
      stylesheets ["assets/css/theme.css", "assets/css/app.css"]
    end

# `contrast_errors`

```elixir
@spec contrast_errors(map(), keyword()) :: [String.t()]
```

# `load_file!`

```elixir
@spec load_file!(Path.t()) :: map()
```

# `stylesheet!`

```elixir
@spec stylesheet!(map(), keyword()) :: String.t()
```

# `stylesheet_from_file!`

```elixir
@spec stylesheet_from_file!(Path.t(), keyword()) :: String.t()
```

Loads VS Code theme JSON from `path`, verifies WCAG contrast, and returns the
generated stylesheet TEXT. The caller writes it to a file and declares that
file in `stylesheets`.

# `verify_contrast!`

```elixir
@spec verify_contrast!(map(), keyword()) :: :ok
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
