CSS border-inline-style Property

The border-inline-style property sets the line styles of an element's logical inline-start and inline-end borders.

It accepts one or two border-style values. A single value applies to both inline borders, while two values let you style each edge separately. The physical borders affected depend on the element's writing mode and text direction, making this property useful for layouts that support different languages and writing systems.

border-inline-style Syntax

The property accepts one or two border-style keywords, or a CSS-wide keyword.

selector {
  border-inline-style: solid;
}

One Value

.panel {
  border-inline-style: solid;
}

Both inline borders use a solid style.

Two Values

.panel {
  border-inline-style: dashed solid;
}

The inline-start border is dashed, and the inline-end border is solid.

Dotted Borders

.panel {
  border-inline-style: dotted;
}

Different Border Styles

.panel {
  border-inline-style: double dashed;
}

Remove Both Borders

.panel {
  border-inline-style: none;
}

CSS-Wide Keywords

.inherited {
  border-inline-style: inherit;
}
.reset {
  border-inline-style: initial;
}
.unset {
  border-inline-style: unset;
}
.reverted {
  border-inline-style: revert;
}
.layer-reverted {
  border-inline-style: revert-layer;
}

CSS-wide keywords must be used alone. For example, border-inline-style: inherit solid; is invalid.

Property Values

The border-inline-style property accepts the standard CSS border-style keywords.

Value Description
none No border is drawn, and the corresponding computed border width becomes zero.
hidden No border is drawn. Also suppresses competing borders in the collapsed table border model.
dotted Displays a border made of dots.
dashed Displays a border made of short line segments.
solid Displays a continuous single-line border.
double Displays two parallel lines separated by a gap.
groove Creates a recessed, carved appearance.
ridge Creates a raised appearance.
inset Creates an inset appearance.
outset Creates an outset appearance.
inherit Inherits both computed inline border styles from the parent.
initial Resets both inline border styles to none.
unset Resets both styles to none because the underlying properties are not inherited.
revert Reverts both styles according to cascade origin rules.
revert-layer Reverts both styles according to cascade layer rules.

Property Characteristics

Characteristic Value
Initial value none for both inline borders
Inherited No
Applies to Elements that support the corresponding border-style properties
Computed value As each underlying longhand property
Animation type As each underlying longhand property (discrete)
Percentages Not applicable
Property type Shorthand
Logical axis Inline axis

The property does not accept border widths, colors, or numeric values. Use border-inline-width and border-inline-color to control those components.

How It Works

The browser identifies the inline-start and inline-end edges, then applies the specified styles to their corresponding physical borders.

Step 1: Set Both Styles

.panel {
  border-inline-style: solid;
}

Both inline borders use a solid style. Their initial width is medium, and their initial color is currentcolor.

Step 2: Set the Widths

.panel {
  border-inline-style: solid;
  border-inline-width: 5px;
}

Both inline borders become 5 pixels wide.

Step 3: Set the Colors

.panel {
  border-inline-style: solid;
  border-inline-width: 5px;
  border-inline-color: #1769aa;
}

Both inline borders become solid blue lines.

Step 4: Use Different Styles

.panel {
  border-inline-style: dashed solid;
  border-inline-width: 5px;
  border-inline-color: #1769aa;
}

The inline-start border becomes dashed, while the inline-end border remains solid.

Step 5: Change the Direction

.panel {
  direction: rtl;
  border-inline-style: dashed solid;
  border-inline-width: 5px;
  border-inline-color: #1769aa;
}

In horizontal right-to-left writing, the dashed border appears on the right and the solid border appears on the left.

The styles follow the logical inline edges rather than fixed physical sides.

One vs. Two Values

The number of values determines whether the inline borders share a style or use different styles.

One Value

.panel {
  border-inline-style: solid;
}

The single value applies to both inline-start and inline-end.

Equivalent Longhands

.panel {
  border-inline-start-style: solid;
  border-inline-end-style: solid;
}

These declarations produce the same result as the single-value shorthand.

Two Values

.panel {
  border-inline-style: dashed dotted;
}

The first value applies to inline-start. The second applies to inline-end.

Equivalent Longhands

.panel {
  border-inline-start-style: dashed;
  border-inline-end-style: dotted;
}

These declarations produce the same result as the two-value shorthand.

Hide One Inline Border

.panel {
  border-inline-style: solid none;
}

The inline-start border is solid, while the inline-end border is not drawn.

Hide the Other Inline Border

.panel {
  border-inline-style: none solid;
}

The inline-start border is not drawn, while the inline-end border is solid.

Invalid Three-Value Syntax

.panel {
  border-inline-style: solid dashed dotted;
}

This declaration is invalid because the property accepts no more than two border-style values.

Unlike the four-sided border-style shorthand, border-inline-style does not accept three or four values.

Writing Modes and Direction

The writing-mode and direction properties determine which physical edges correspond to inline-start and inline-end.

Writing Mode Direction Inline-Start Inline-End
horizontal-tb ltr Left Right
horizontal-tb rtl Right Left
vertical-rl ltr Top Bottom
vertical-rl rtl Bottom Top
vertical-lr ltr Top Bottom
vertical-lr rtl Bottom Top
sideways-rl ltr Top Bottom
sideways-lr ltr Bottom Top

Horizontal Left-to-Right

.panel {
  writing-mode: horizontal-tb;
  direction: ltr;
  border-inline-width: 5px;
  border-inline-style: dashed solid;
  border-inline-color: #1769aa;
}

The left border is dashed, and the right border is solid.

Horizontal Right-to-Left

.panel {
  writing-mode: horizontal-tb;
  direction: rtl;
  border-inline-width: 5px;
  border-inline-style: dashed solid;
  border-inline-color: #1769aa;
}

The right border is dashed, and the left border is solid.

Vertical Left-to-Right Progression

.panel {
  writing-mode: vertical-rl;
  direction: ltr;
  border-inline-width: 5px;
  border-inline-style: dashed solid;
  border-inline-color: #1769aa;
}

The top border is dashed, and the bottom border is solid.

Vertical Right-to-Left Progression

.panel {
  writing-mode: vertical-lr;
  direction: rtl;
  border-inline-width: 5px;
  border-inline-style: dashed solid;
  border-inline-color: #1769aa;
}

The bottom border is dashed, and the top border is solid.

Using the HTML dir Attribute

<div dir="ltr" class="directional-panel">
  Left-to-right content
</div>
<div dir="rtl" class="directional-panel">
  Right-to-left content
</div>
.directional-panel {
  padding: 20px;
  border-inline-width: 5px;
  border-inline-style: dashed solid;
  border-inline-color: #1769aa;
}

The same CSS applies dashed and solid borders to the appropriate logical edges in both text directions.

Border Style Keywords

The property supports ten standard border-style keywords. Each can be applied to one or both inline borders.

none

.panel {
  border-inline-style: none;
}

Neither inline border is drawn. Both corresponding computed border widths become zero.

hidden

.panel {
  border-inline-style: hidden;
}

Neither inline border is drawn. This value also has special behavior when resolving collapsed table borders.

dotted

.panel {
  border-inline-style: dotted;
}

Both inline borders consist of dots.

dashed

.panel {
  border-inline-style: dashed;
}

Both inline borders consist of short line segments.

solid

.panel {
  border-inline-style: solid;
}

Both inline borders display continuous lines.

double

.panel {
  border-inline-width: 6px;
  border-inline-style: double;
}

Each inline border displays two parallel lines separated by a gap. The total thickness remains within the specified border width.

groove

.panel {
  border-inline-width: 6px;
  border-inline-style: groove;
}

Both inline borders have a recessed appearance.

ridge

.panel {
  border-inline-width: 6px;
  border-inline-style: ridge;
}

Both inline borders have a raised appearance.

inset

.panel {
  border-inline-width: 6px;
  border-inline-style: inset;
}

The borders use shading associated with an inset appearance.

outset

.panel {
  border-inline-width: 6px;
  border-inline-style: outset;
}

The borders use shading associated with a raised appearance.

Mixing Styles

.panel {
  border-inline-width: 6px;
  border-inline-style: double dotted;
  border-inline-color: #1769aa;
}

The inline-start border is double, while the inline-end border is dotted.

Dot spacing, dash patterns, and three-dimensional border effects can vary between browsers.

none vs. hidden

Both none and hidden prevent a border from being drawn, but they differ when borders conflict in collapsed tables.

Using none

.panel {
  border-inline: 5px solid #1769aa;
  border-inline-style: none;
}

Both inline borders disappear, and their computed widths become zero.

Using hidden

.panel {
  border-inline: 5px solid #1769aa;
  border-inline-style: hidden;
}

Both inline borders disappear, and their computed widths become zero.

Hide Only Inline-Start

.panel {
  border-inline: 5px solid #1769aa;
  border-inline-style: none solid;
}

The inline-start border is removed, while the inline-end border remains solid.

Hide Only Inline-End

.panel {
  border-inline: 5px solid #1769aa;
  border-inline-style: solid none;
}

The inline-start border remains solid, while the inline-end border is removed.

Collapsed Table Borders

table {
  border-collapse: collapse;
}
td {
  border: 2px solid #cccccc;
}
td.no-inline-borders {
  border-inline-style: hidden;
}

In the collapsed border model, hidden suppresses competing borders on the corresponding edges.

Using none in a Table

table {
  border-collapse: collapse;
}
td {
  border: 2px solid #cccccc;
}
td.no-inline-borders {
  border-inline-style: none;
}

Another cell's competing border may still be displayed because none does not suppress competing borders in the same way.

For ordinary elements, both values hide the affected borders. Use hidden when its collapsed-table conflict behavior is required.

Border Width and Color

The border-inline-style property controls line patterns only. Width and color are specified separately.

Styles Only

.panel {
  border-inline-style: dashed solid;
}

The borders use the initial medium width and currentcolor, unless other declarations override those values.

Styles and Widths

.panel {
  border-inline-style: dashed solid;
  border-inline-width: 8px 4px;
}

The inline-start border is 8 pixels wide and dashed. The inline-end border is 4 pixels wide and solid.

Styles and Colors

.panel {
  border-inline-style: dashed solid;
  border-inline-color: #1769aa #27ae60;
}

The inline-start border is dashed and blue. The inline-end border is solid and green.

All Three Components

.panel {
  border-inline-width: 8px 4px;
  border-inline-style: dashed solid;
  border-inline-color: #1769aa #27ae60;
}

Each inline border has its own width, style, and color.

Using currentcolor

.panel {
  color: #1769aa;
  border-inline-width: 5px;
  border-inline-style: solid;
  border-inline-color: currentcolor;
}

Both inline borders follow the element's text color.

Transparent Inline-End Border

.panel {
  border-inline-width: 5px;
  border-inline-style: solid;
  border-inline-color: #1769aa transparent;
}

The inline-start border is blue. The inline-end border is transparent but still occupies space.

Zero Width

.panel {
  border-inline-width: 5px 0;
  border-inline-style: solid;
  border-inline-color: #1769aa;
}

Only the inline-start border has visible thickness.

A visible border generally requires a nonzero width, a style other than none or hidden, and a visible color.

Shorthand Properties

The border-inline-style property is a shorthand for the inline-start and inline-end border-style longhands.

Equivalent Longhands

.panel {
  border-inline-start-style: dashed;
  border-inline-end-style: solid;
}

Equivalent Shorthand

.panel {
  border-inline-style: dashed solid;
}

Both examples set the same styles.

border-inline Shorthand

.panel {
  border-inline: 5px solid #1769aa;
}

This sets both inline borders to the same width, style, and color.

Override One Style

.panel {
  border-inline: 5px solid #1769aa;
  border-inline-start-style: dashed;
}

The inline-start border becomes dashed while the inline-end border remains solid.

Override Both Styles

.panel {
  border-inline: 5px solid #1769aa;
  border-inline-style: dashed dotted;
}

The inline-start border becomes dashed and the inline-end border becomes dotted. Their widths and colors remain unchanged.

border-inline-start Shorthand

.panel {
  border-inline-style: dashed dotted;
  border-inline-start: 8px solid #1769aa;
}

The later inline-start shorthand changes that border's style to solid. The inline-end border remains dotted.

border Shorthand

.panel {
  border: 2px solid #cccccc;
  border-inline-style: dashed dotted;
}

All four borders are initially solid. The inline-start border becomes dashed, and the inline-end border becomes dotted.

Shorthand Reset

.panel {
  border-inline-style: dashed dotted;
  border-inline: 5px solid #1769aa;
}

The later border-inline shorthand resets both styles to solid.

One-Value Shorthand Reset

.panel {
  border-inline-start-style: dashed;
  border-inline-end-style: dotted;
  border-inline-style: solid;
}

The final declaration changes both styles to solid.

Use border-inline-style when changing both inline border styles without modifying their widths or colors.

Physical vs. Logical Border Styles

Physical border properties target fixed edges, while logical border properties follow the inline axis.

Property Target
border-left-style Physical left border
border-right-style Physical right border
border-top-style Physical top border
border-bottom-style Physical bottom border
border-inline-start-style Logical inline-start border
border-inline-end-style Logical inline-end border
border-inline-style Both logical inline borders

Physical Left and Right Borders

.panel {
  border-left: 5px dashed #1769aa;
  border-right: 5px solid #1769aa;
}

The dashed border remains on the left and the solid border remains on the right, regardless of text direction.

Logical Inline Borders

.panel {
  border-inline-width: 5px;
  border-inline-style: dashed solid;
  border-inline-color: #1769aa;
}

The dashed border follows inline-start, while the solid border follows inline-end.

Horizontal LTR

.panel {
  direction: ltr;
  border-inline: 5px solid #1769aa;
  border-inline-style: dashed solid;
}

The left border is dashed, and the right border is solid.

Horizontal RTL

.panel {
  direction: rtl;
  border-inline: 5px solid #1769aa;
  border-inline-style: dashed solid;
}

The right border is dashed, and the left border is solid.

Vertical Writing

.panel {
  writing-mode: vertical-rl;
  direction: ltr;
  border-inline: 5px solid #1769aa;
  border-inline-style: dashed solid;
}

The top border is dashed, and the bottom border is solid.

Physical and Logical Conflicts

.panel {
  border: 2px solid #cccccc;
  border-left-style: solid;
  border-right-style: solid;
  border-inline-style: dashed dotted;
}

In horizontal left-to-right writing, the later logical shorthand changes the left border to dashed and the right border to dotted when the declarations have equal cascade priority.

In horizontal right-to-left writing, the right border becomes dashed and the left border becomes dotted.

Prefer logical border properties when an interface needs to support both left-to-right and right-to-left content.

Cascade and Overrides

The CSS cascade determines which border styles apply when multiple declarations target the same edges.

Later Declaration

.panel {
  border-inline-style: solid;
  border-inline-style: dashed dotted;
}

The later declaration sets the inline-start border to dashed and the inline-end border to dotted when both declarations have equal cascade priority.

Higher Specificity

.panel {
  border-inline-style: solid;
}
.panel.featured {
  border-inline-style: double dashed;
}

The featured panel uses double and dashed styles because its selector is more specific.

Longhand Override

.panel {
  border-inline-style: dashed dotted;
  border-inline-end-style: solid;
}

The inline-start border remains dashed, while the inline-end border becomes solid.

Shorthand Override

.panel {
  border-inline-style: dashed dotted;
  border-inline: 5px solid #1769aa;
}

The later shorthand resets both styles to solid.

Physical Style Conflict

.panel {
  border: 2px solid #cccccc;
  border-left-style: solid;
  border-inline-style: dashed dotted;
}

In horizontal left-to-right writing, the inline-start style maps to the left border. The later dashed value wins when cascade priority is otherwise equal.

CSS Layers

@layer base, components;
@layer base {
  .panel {
    border-inline-style: solid;
  }
}
@layer components {
  .panel {
    border-inline-style: dashed dotted;
  }
}

For normal declarations, the later layer takes precedence, so the dashed and dotted styles win.

When the border styles do not match the expected result, check shorthand declarations, specificity, cascade layers, and writing direction.

CSS Custom Properties

CSS custom properties can store reusable border styles for both logical inline edges.

One Shared Style

:root {
  --inline-border-style: solid;
}
.panel {
  border-inline-width: 5px;
  border-inline-color: #1769aa;
  border-inline-style: var(--inline-border-style);
}

Both inline borders use the shared style.

Two Different Styles

:root {
  --inline-border-styles: dashed solid;
}
.panel {
  border-inline-width: 5px;
  border-inline-color: #1769aa;
  border-inline-style: var(--inline-border-styles);
}

The custom property supplies two border-style values.

Component Override

.panel {
  --inline-border-styles: solid;
  border-inline-width: 5px;
  border-inline-color: #1769aa;
  border-inline-style: var(--inline-border-styles);
}
.panel.alternate {
  --inline-border-styles: dashed dotted;
}

The alternate panel uses different styles on its inline edges.

Fallback Styles

.panel {
  border-inline-width: 5px;
  border-inline-color: #1769aa;
  border-inline-style: var(--inline-border-styles, solid);
}

The fallback solid style is used when the custom property is unavailable or has the guaranteed-invalid value.

Theme-Based Styles

:root {
  --inline-border-styles: solid;
}
[data-theme="decorative"] {
  --inline-border-styles: double dashed;
}
.panel {
  border-inline-width: 6px;
  border-inline-color: #1769aa;
  border-inline-style: var(--inline-border-styles);
}

The border styles change with the selected theme.

Custom properties are useful when several components share the same logical border styling rules.

Interactive States

Logical border styles can change in response to hover, focus, selection, and other interface states.

Hover State

.panel {
  border-inline: 5px solid #1769aa;
}
.panel:hover {
  border-inline-style: dashed;
}

Both inline borders change from solid to dashed on hover.

Focus State

.form-field {
  border-inline: 5px solid #cccccc;
}
.form-field:focus {
  border-inline-style: double;
  border-inline-color: #1769aa;
}

Both inline borders become double and blue when the field receives focus.

Keyboard Focus

.form-field {
  border-inline: 5px solid #cccccc;
}
.form-field:focus-visible {
  border-inline-style: solid;
  border-inline-color: #1769aa;
  outline: 2px solid #1769aa;
  outline-offset: 2px;
}

The outline provides an additional visible focus indicator.

Selected Item

.selectable-panel {
  border-inline: 5px dashed #cccccc;
}
.selectable-panel.is-selected {
  border-inline-style: solid;
  border-inline-color: #1769aa;
}

The selected panel uses solid blue inline borders.

Current Navigation Item

.nav-link {
  border-inline: 4px solid transparent;
}
.nav-link[aria-current="page"] {
  border-inline-style: solid;
  border-inline-color: #1769aa;
}

The current navigation item receives visible inline borders.

Discrete Style Changes

.panel {
  border-inline: 5px solid #1769aa;
  transition: border-inline-style 0.3s;
}
.panel:hover {
  border-inline-style: dashed;
}

Border-style values change discretely rather than smoothly interpolating between line patterns.

For smoother visual feedback, animate border-inline-color instead. Important interface states should also be communicated through text or other accessible indicators.

Responsive Design

The border-inline-style property can adapt to viewport size, container size, and writing mode.

Media Query

.responsive-panel {
  border-inline: 5px solid #1769aa;
}
@media (max-width: 600px) {
  .responsive-panel {
    border-inline-style: dashed;
  }
}

Both inline borders become dashed on smaller screens.

Container Query

.panel-container {
  container-type: inline-size;
}
.responsive-panel {
  border-inline: 5px solid #1769aa;
}
@container (min-width: 500px) {
  .responsive-panel {
    border-inline-style: double dashed;
  }
}

The inline-start border becomes double and the inline-end border becomes dashed when the query container reaches the specified inline size.

Dark Color Scheme

.responsive-panel {
  border-inline: 5px solid #1769aa;
}
@media (prefers-color-scheme: dark) {
  .responsive-panel {
    border-inline-style: dashed;
    border-inline-color: #79b8f3;
  }
}

The borders become dashed and use a lighter color in dark mode.

Responsive Writing Mode

.responsive-panel {
  writing-mode: horizontal-tb;
  border-inline: 5px solid #1769aa;
  border-inline-style: dashed solid;
}
@media (min-width: 900px) {
  .responsive-panel {
    writing-mode: vertical-rl;
  }
}

With left-to-right inline progression, the dashed and solid borders move from the left and right edges to the top and bottom edges.

Responsive Custom Property

.responsive-panel {
  --inline-border-styles: solid;
  border-inline: 5px solid #1769aa;
  border-inline-style: var(--inline-border-styles);
}
@media (max-width: 600px) {
  .responsive-panel {
    --inline-border-styles: dotted dashed;
  }
}

The border styles change through a custom property.

Logical borders are especially useful in responsive designs that must also support different writing directions.

Practical Uses

The border-inline-style property can create symmetrical or contrasting border accents along an element's inline axis.

Information Panel

.info-panel {
  padding: 20px;
  border-inline-width: 5px;
  border-inline-style: solid;
  border-inline-color: #1769aa;
  background-color: #f3f8fc;
}

Solid inline borders frame the panel along the inline axis.

Draft Content

.draft-panel {
  padding: 20px;
  border-inline-width: 5px;
  border-inline-style: dashed;
  border-inline-color: #d35400;
}

Dashed borders can visually distinguish draft content.

Optional Content

.optional-panel {
  padding: 20px;
  border-inline-width: 4px;
  border-inline-style: dotted;
  border-inline-color: #777777;
}

Dotted borders can identify optional content.

Contrasting Inline Borders

.feature-panel {
  padding: 20px;
  border-inline-width: 8px 4px;
  border-inline-style: double solid;
  border-inline-color: #1769aa #cccccc;
}

The inline-start border receives a stronger decorative accent.

Highlighted Section

.highlighted-section {
  padding: 20px;
  border-inline-width: 6px;
  border-inline-style: double;
  border-inline-color: #1769aa;
}

Double borders create a distinctive visual frame.

Selected Card

.card {
  border-inline: 4px dashed #cccccc;
}
.card.is-selected {
  border-inline-style: solid;
  border-inline-color: #1769aa;
}

The selected card uses solid blue inline borders.

Form Validation

.form-field {
  border-inline: 4px solid #cccccc;
}
.form-field:invalid {
  border-inline-style: dashed;
  border-inline-color: #c0392b;
}
.form-field:valid {
  border-inline-style: solid;
  border-inline-color: #27ae60;
}

Border style and color provide visual validation feedback. Include text feedback so users do not have to interpret the border alone.

Choose styles that remain readable at the specified border widths and use them consistently throughout the interface.

border-inline-style Example

The following example compares several inline border-style combinations using the same width and color.

<div class="border-inline-style-demo">
  <div class="demo-box solid">solid</div>
  <div class="demo-box dashed">dashed</div>
  <div class="demo-box dotted">dotted</div>
  <div class="demo-box double">double</div>
  <div class="demo-box mixed-one">dashed solid</div>
  <div class="demo-box mixed-two">double dotted</div>
  <div class="demo-box start-only">solid none</div>
  <div class="demo-box end-only">none solid</div>
</div>
.border-inline-style-demo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.border-inline-style-demo .demo-box {
  box-sizing: border-box;
  padding: 20px;
  border-inline-width: 6px;
  border-inline-color: #1769aa;
  background-color: #f3f8fc;
  color: #173b5e;
  font-weight: bold;
}
.border-inline-style-demo .solid {
  border-inline-style: solid;
}
.border-inline-style-demo .dashed {
  border-inline-style: dashed;
}
.border-inline-style-demo .dotted {
  border-inline-style: dotted;
}
.border-inline-style-demo .double {
  border-inline-style: double;
}
.border-inline-style-demo .mixed-one {
  border-inline-style: dashed solid;
}
.border-inline-style-demo .mixed-two {
  border-inline-style: double dotted;
}
.border-inline-style-demo .start-only {
  border-inline-style: solid none;
}
.border-inline-style-demo .end-only {
  border-inline-style: none solid;
}
Browser Result
solid
dashed
dotted
double
dashed solid
double dotted
solid none
none solid

The first four examples apply the same style to both inline borders. The remaining examples demonstrate how two values control inline-start and inline-end independently.

The exact appearance of dotted, dashed, and double borders can vary between browsers.

Important Considerations

Keep the following points in mind when using border-inline-style:

  • Purpose: Sets the line styles of both logical inline borders.
  • Property type: Shorthand.
  • Underlying properties: border-inline-start-style and border-inline-end-style.
  • Initial values: none for both borders.
  • Inheritance: The underlying properties are not inherited.
  • Logical axis: Follows the inline axis.
  • One value: Applies the same style to both inline borders.
  • Two values: The first applies to inline-start, and the second applies to inline-end.
  • Three or four values: Invalid.
  • Writing mode: Determines whether the inline axis is horizontal or vertical.
  • Direction: Determines which physical edges are inline-start and inline-end.
  • Horizontal LTR: Controls the left and right border styles.
  • Horizontal RTL: Controls the right and left border styles, respectively.
  • Vertical writing: Controls the top and bottom border styles according to inline progression.
  • Valid styles: none, hidden, dotted, dashed, solid, double, groove, ridge, inset, and outset.
  • none: Removes the corresponding border and gives it a computed width of zero.
  • hidden: Also suppresses the border and has special collapsed-table behavior.
  • Width: Is controlled separately by border-inline-width.
  • Color: Is controlled separately by border-inline-color.
  • Default color: Uses currentcolor unless overridden.
  • Visibility: A nonzero width and visible style are required for a visible border.
  • border-inline: Sets width, style, and color for both inline borders.
  • Physical borders: May conflict with logical declarations when they target the same physical edge.
  • Shorthand resets: Later border shorthands can override the styles.
  • Animation: Border-style changes are discrete.
  • Custom properties: Can store one or two reusable border-style values.
  • Responsive design: Supports media queries and container queries.
  • Accessibility: Do not rely on border styles alone to communicate important information.
  • Browser support: Modern browsers support the standard property without vendor prefixes.

Use border-inline-style when both logical inline borders need their styles set together without changing their widths or colors.

Browser Support

The border-inline-style property is widely available in current versions of Chrome, Edge, Firefox, Safari, and other major browsers.

The standard property does not require vendor prefixes in modern browsers.

Basic Declaration

.panel {
  border-inline-width: 5px;
  border-inline-style: dashed solid;
  border-inline-color: #1769aa;
}

Right-to-Left Direction

.panel {
  direction: rtl;
  border-inline: 5px solid #1769aa;
  border-inline-style: dashed dotted;
}

Vertical Writing Mode

.panel {
  writing-mode: vertical-rl;
  border-inline: 5px solid #1769aa;
  border-inline-style: dashed dotted;
}

Physical Border Fallback

.panel {
  border-left: 5px dashed #1769aa;
  border-right: 5px solid #1769aa;
}
@supports (border-inline-style: dashed solid) {
  .panel {
    border-left: 0;
    border-right: 0;
    border-inline: 5px solid #1769aa;
    border-inline-style: dashed solid;
  }
}

This fallback assumes horizontal left-to-right writing. Older browsers use physical left and right borders, while supporting browsers use logical inline borders.

Visit Can I Use? and search for border-inline-style to review browser compatibility.

Specifications

The border-inline-style property is defined in the CSS Logical Properties and Values Module Level 1 specification.

CSS Logical Properties and Values Module Level 1

The specification defines how one or two style values apply to the logical inline-start and inline-end borders.

The available border styles and their rendering behavior are also defined by the CSS Backgrounds and Borders specification.

CSS Backgrounds and Borders Module Level 3