border-block

The most powerful logical shorthand for borders. It sets the width, style, and color of both the 'start' and 'end' borders in the block dimension with a single line of CSS.

It is documented as part of the CSS Logical Properties and Values specification.

/* Usage Example */
.panel {
  /* Sets a 1px solid gray border on both top and bottom edges */
  border-block: 1px solid #ccc;
}

/* Syntax */
border-block: border-block-start;

/* Global values */
border-block: inherit;
border-block: initial;
border-block: revert;
border-block: revert-layer;
border-block: unset;
Widely available Since 2021 95% global usage

This feature is well established and works across many devices and browser versions. It has been available across browsers since 2021.

87+
66+
14.1+
87+
Kinsta

Your first month is free

Managed WordPress hosting for faster sites.

Learn more

New CSS drops.

Join 600+ readers who've survived clearfix hacks.

ESC