# Module /repr/css

CSS AST compiler and nested stylesheet formatter (format-css, scss->css) powering #css blocks.

```tangu
(use /repr/css)
```

## Functions & symbols

### format-css

`(format-css css-expr) -> String`

Compiles an `#css` S-expression stylesheet (including nested `&` selectors, `@media`/`@layer`, custom properties) into standard CSS.

| Parameter | Type | Optional | Description |
| :--- | :--- | :--- | :--- |
| `css_expr` | `Any` | no | Evaluated `#css` AST rule tree or Array of rules |

```tangu
(repr-css/format-css #css [[:.card {:padding "1rem" :&hover {:opacity 0.9}}]])
```

### scss->css

`(scss->css css-expr) -> String`

Alias of `format-css`: lowers nested `#css` S-expression rules to flat browser-ready CSS.

| Parameter | Type | Optional | Description |
| :--- | :--- | :--- | :--- |
| `css_expr` | `Any` | no | Evaluated `#css` stylesheet expression |

```tangu
(repr-css/scss->css my-styles)
```
