padding-block

A logical shorthand for setting both 'padding-block-start' and 'padding-block-end'. It's like setting 'padding-top' and 'padding-bottom' at the same time.

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

/* Usage Example */
.card {
  /* Adds 1rem padding to the top AND bottom logically */
  padding-block: 1rem;
}

/* Syntax */
padding-block: padding-top;

/* Global values */
padding-block: inherit;
padding-block: initial;
padding-block: revert;
padding-block: revert-layer;
padding-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