Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / CSS

border-inline-style — logical inline border styles

The border-inline-style shorthand sets the border styles at the start and end of the inline axis. One value applies to both edges; two values specify start and end respectively. The physical sides depend on writing direction and writing mode.

Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required

Syntax

border-inline-style: <'border-top-style'>{1,2};

border-inline-style sets border-inline-start-style and border-inline-end-style. One value, such as solid, sets both edges; two values, such as solid dashed, specify inline start and inline end respectively. This is not the top–right–bottom–left ordering used by border-style.

Available styles are none, hidden, dotted, dashed, solid, double, groove, ridge, inset, and outset. Both longhands initially have none and are not inherited. The shorthand sets only style, not width or color; use border-inline-width and border-inline-color for those. With none or hidden, the ordinary styled border is not drawn and its used width is zero. A border image with an independently specified width can still be drawn along that edge.

Mapping to physical edges depends on writing-mode, direction, and text-orientation. With horizontal-tb and ltr, start is left and end is right; with rtl, they swap. In vertical writing modes, the inline axis runs vertically, so this property must not be treated as a fixed left–right pair.

Examples

<!doctype html>
<meta charset="utf-8">
<title>border-inline-style</title>
<style>
  .sample {
    writing-mode: horizontal-tb;
    direction: ltr;
    border: 0 solid black;
    border-inline-width: 4px;
    border-inline-style: solid dashed;
    padding: 12px;
    margin: 12px;
  }
  .rtl { direction: rtl; }
</style>
<div class="sample">LTR</div>
<div class="sample rtl">RTL</div>

Result

LTR: left border solid, right border dashed. RTL: left border dashed, right border solid. All visible borders are black and 4px wide; top and bottom borders have zero width.

The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.

Sources