---
title: "clamped-value"
description: "Reports a value outside the range that the browser uses, such as opacity above 1."
image: "https://stillwind.dev/og.png"
---

> Documentation Index
> Fetch the complete documentation index at: https://stillwind.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# clamped-value

This rule reports a literal value outside the range that the browser uses for the
property. The browser clamps the value to the range, so the extra amount has no
effect. For example, `opacity-150` behaves the same as `opacity-100`.

## Reported

```tsx
style("opacity-150");
```

> clamped-value: browsers clamp `opacity: calc(150 * 1%)` to `opacity: 100%`
> 
> Example:1:16

## Fixed

```tsx
style("opacity-100");
```

## How to fix

Use the end of the range that the value reaches, as in the example, or a value
inside the range.

The rule checks values written in the code. It does not check values that a
custom property receives at runtime.

## Rule settings

| Preset | Severity |
| --- | --- |
| `recommended` | warn |
| `strict` | deny |
| `stylistic` | off |

[Configure lint](/docs/configuration#lint) to change the severity or options.

Source: https://stillwind.dev/docs/lints/clamped-value/index.mdx
