border-width

Introduction

A shorthand property for setting the width of all four borders of an element. It corresponds to border-top-width, border-right-width, border-bottom-width, and border-left-width.

Usage Examples

Syntax

border-width: thin medium thick 10px;

Values

  • thin | medium | thick | <length>
  • Supports 1-4 value syntax (top → right → bottom → left).

Formal Definition

Initial value0
Applies toAll elements
Inheritedno
Animatableyes

Formal Syntax

border-width = [ <line-width> ]{1,4}
<line-width> = <length> | thin | medium | thick

Differences from the Web

  • MDN Reference
  • Default value is different (Web default is medium).
  • Does not support global values.

Compatibility

LCD tables only load in the browser

Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.