> For the complete documentation index, see [llms.txt](https://lochiwei.gitbook.io/web/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lochiwei.gitbook.io/web/css/functions.md).

# functions

[CSS](/web/css.md) ⟩ [values](/web/css/values.md) ⟩ functions

{% hint style="info" %}

{% endhint %}

{% tabs %}
{% tab title="💾 程式" %}

```css
width: calc(10px * pow(5, 2));     /* 10px * 5² = 250px */
```

{% endtab %}

{% tab title="🔴 主題" %}

* [calc()](/web/css/functions/calc.md)
  {% endtab %}

{% tab title="📗 參考" %}

* Modern CSS (2020)
  {% endtab %}

{% tab title="📘 手冊" %}

* [CSS](https://developer.mozilla.org/en-US/docs/Web/CSS) ⟩ [CSS functions](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Functions) ⟩ [calc()](https://developer.mozilla.org/en-US/docs/Web/CSS/calc), [pow()](https://developer.mozilla.org/en-US/docs/Web/CSS/pow)
  {% endtab %}
  {% endtabs %}

| function                  | note                                                                                                                                   |
| ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| **var**( )                | reference to a [**css variable**](/web/css/var.md).                                                                                    |
| **calc**( )               | <p></p><p>supports (+, -, \*, /), "<strong>+</strong>" and "<strong>-</strong>" must be <strong>surrounded by whitespace</strong>.</p> |
| **clamp**(min, pref, max) | arguments: the **minimum** size, the **preferred** size, and the **maximum** size.                                                     |
