From ec57b32fa30dbaeaa392b4bab1a51a0aa34c7f5b Mon Sep 17 00:00:00 2001 From: sb3nder Date: Tue, 19 May 2026 22:36:34 +0200 Subject: [PATCH] add `Snap a length as a line width` --- files/en-us/web/css/reference/values/length/index.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/files/en-us/web/css/reference/values/length/index.md b/files/en-us/web/css/reference/values/length/index.md index 84e2eb2cf218fdc..9d054c804a3b964 100644 --- a/files/en-us/web/css/reference/values/length/index.md +++ b/files/en-us/web/css/reference/values/length/index.md @@ -193,6 +193,12 @@ For high-dpi devices, inches (`in`), centimeters (`cm`), and millimeters (`mm`) - `pt` - : One point. `1pt` = `1in / 72`. +## Rounding + +### Snap a length as a line width + +While the exact supported precision of numeric values, and how they are rounded to match that precision, is generally implementation-defined, computed `` values in `border-width` and a few other properties are rounded in a specific way to ensure reasonable visual display. This rounding method effectively rounds `` to an integer number of device pixels, while ensuring non-zero values remain visible. The CSS-Values specification provides the details. + ## Interpolation When animated, values of the `` data type are interpolated as real, floating-point numbers. The {{glossary("interpolation")}} happens on the calculated value. The speed of the interpolation is determined by the [easing function](/en-US/docs/Web/CSS/Reference/Values/easing-function) associated with the animation.