Skip to content
Skip the list of specifications

border-image-width

matches Chrome on some values: 3 of 8 examples match Chrome

css-borders-4

Some of the examples match Chrome and some do not: the count says how many, and the values that differ are listed first, each with its difference map.

The 5 that do not: border-image-width:auto, border-image-width:40%, border-image-width:4px, border-image-width:0.4, border-image-width:calc(40% + 20px). They come first below, each with its difference map.

What the specification says

Initial value1
Applies toAll elements, except internal table elements when border-collapse is collapse
Inheritedno
PercentagesRelative to width/height of the border image area
Computed valuefour values, each either a number, the keyword auto, or a computed <length-percentage> value
Syntax[ <length-percentage [0,∞]> | <number [0,∞]> | auto ]{1,4}

The definition in css-borders-4

The measurements

8 examples: five render differently and come first and three match Chrome. Each is one declaration on a small page, drawn by Chrome and by our engine. Drag on a picture to move the line between them.

border-image-width:auto

renders differently
Chrome rendering
Ours rendering
Left of the line is ours, right of it Chrome’s rendering. Drag on the picture to move the line.
Pixels that differ from Chrome35,572
The same, on the page without the declaration21,100
Largest difference on one colour channel255 of 255
The same, on the page without the declaration3 of 255

The declaration takes effect differently from Chrome: the difference map shows where.

The example’s page

border-image-width:40%

renders differently
Chrome rendering
Ours rendering
Left of the line is ours, right of it Chrome’s rendering. Drag on the picture to move the line.
Pixels that differ from Chrome42,112
The same, on the page without the declaration21,100
Largest difference on one colour channel255 of 255
The same, on the page without the declaration3 of 255

The declaration takes effect differently from Chrome: the difference map shows where.

The example’s page

border-image-width:4px

renders differently
Chrome rendering
Ours rendering
Left of the line is ours, right of it Chrome’s rendering. Drag on the picture to move the line.
Pixels that differ from Chrome1,975
The same, on the page without the declaration21,100
Largest difference on one colour channel13 of 255
The same, on the page without the declaration3 of 255

The declaration takes effect differently from Chrome: the difference map shows where.

The example’s page

border-image-width:0.4

renders differently
Chrome rendering
Ours rendering
Left of the line is ours, right of it Chrome’s rendering. Drag on the picture to move the line.
Pixels that differ from Chrome6,781
The same, on the page without the declaration21,100
Largest difference on one colour channel204 of 255
The same, on the page without the declaration3 of 255

The declaration takes effect differently from Chrome: the difference map shows where.

The example’s page

border-image-width:calc(40% + 20px)

renders differently
Chrome rendering
Ours rendering
Left of the line is ours, right of it Chrome’s rendering. Drag on the picture to move the line.
Pixels that differ from Chrome39,954
The same, on the page without the declaration21,100
Largest difference on one colour channel255 of 255
The same, on the page without the declaration3 of 255

The declaration takes effect differently from Chrome: the difference map shows where.

The example’s page

border-image-width:50%

below the visible threshold
Chrome rendering
Ours rendering
Left of the line is ours, right of it Chrome’s rendering. Drag on the picture to move the line.
Pixels that differ from Chrome31,851
The same, on the page without the declaration21,100
Largest difference on one colour channel1 of 255
The same, on the page without the declaration3 of 255

What differs is anti-aliasing only.

The example’s page

border-image-width:2

below the visible threshold
Chrome rendering
Ours rendering
Left of the line is ours, right of it Chrome’s rendering. Drag on the picture to move the line.
Pixels that differ from Chrome30,073
The same, on the page without the declaration21,100
Largest difference on one colour channel2 of 255
The same, on the page without the declaration3 of 255

What differs is anti-aliasing only.

The example’s page

border-image-width:20px

same effect as Chrome
Chrome rendering
Ours rendering
Left of the line is ours, right of it Chrome’s rendering. Drag on the picture to move the line.
Pixels that differ from Chrome17,736
The same, on the page without the declaration21,100
Largest difference on one colour channel3 of 255
The same, on the page without the declaration3 of 255

The pages differ by 17,736 pixels with the declaration and by 21,100 without it: what differs is there before the property (mostly the fonts), and the declaration does not add to it.

The example’s page

Which values were measured

A match on one example means a match at the value tried. The property’s grammar has 4 branches, and 4 of them carry a measurement.

ValueMeasured
20px
4px
same effect as Chrome
renders differently
50%
40%
calc(40% + 20px)
below the visible threshold
renders differently
renders differently
2
0.4
below the visible threshold
renders differently
auto
renders differently

Tests that name this property

1 web-platform-test links to this property’s definition. Few tests carry such a link, so a short list says little about the property.

Measured against Chrome 148.0.7778.96 on 5 November 2026, with up to 40 candidate values tried per property. How it was measured