CKTIS / CSS
padding-block-start — padding at the block-start edge
padding-block-start sets inner spacing at the start of an element’s block axis. Unlike padding-top, it targets a logical side determined by the writing mode.
Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
Syntax
padding-block-start: <'padding-top'>;padding-block-start sets spacing between content and border at the block-start edge. This is inner padding, not an outer margin. With writing-mode: horizontal-tb it targets the top; with writing-mode: vertical-rl it targets the right.
It accepts a nonnegative length or percentage, such as 20px, 1rem, or 5%; auto and negative values are invalid. Percentages refer to the containing block’s logical width, not the element’s height. The initial value is 0, and the property is not inherited.
padding-block-start changes one side, whereas the padding-block shorthand sets both block-start and block-end. In the example, the same declaration produces top or right padding depending on writing-mode.
Examples
<!doctype html>
<meta charset="utf-8">
<title>padding-block-start</title>
<style>
.box {
padding: 0;
padding-block-start: 20px;
border: 1px solid;
margin: 8px;
}
#horizontal { writing-mode: horizontal-tb; }
#vertical { writing-mode: vertical-rl; }
</style>
<div id="horizontal" class="box">ABC</div>
<div id="vertical" class="box">ABC</div>
<pre id="result"></pre>
<script>
const lines = ['horizontal', 'vertical'].map(id => {
const style = getComputedStyle(document.getElementById(id));
return `${id}: top=${style.paddingTop}, right=${style.paddingRight}`;
});
document.getElementById('result').textContent = lines.join('\n');
</script>Result
horizontal: top=20px, right=0px vertical: top=0px, right=20px
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.