border-inline-start-color

Baseline Widely available

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

border-inline-start-colorCSS のプロパティで、要素の論理的なインライン方向の先頭側の境界色を定義し、それが要素の書字方向やテキストの方向に応じて物理的な境界色に対応づけられます。これは border-top-colorborder-right-colorborder-bottom-colorborder-left-color の何れかに対応し、どれに対応するかは writing-modedirectiontext-orientation で定義された値によって決まります。

試してみましょう

border-inline-start-color: red;
writing-mode: horizontal-tb;
border-inline-start-color: #32a1ce;
writing-mode: vertical-rl;
border-inline-start-color: rgb(170, 50, 220, 0.6);
writing-mode: horizontal-tb;
direction: rtl;
<section class="default-example" id="default-example">
  <div class="transition-all" id="example-element">
    This is a box with a border around it.
  </div>
</section>
#example-element {
  background-color: #eee;
  color: #000;
  border: 0.75em solid;
  padding: 0.75em;
  width: 80%;
  height: 100px;
  unicode-bidi: bidi-override;
}

構文

css
border-inline-start-color: red;
border-inline-start-color: #ee4141;

/* グローバル値 */
border-inline-start-color: inherit;
border-inline-start-color: initial;
border-inline-start-color: revert;
border-inline-start-color: unset;

関連するプロパティとしては、 border-block-start-colorborder-block-end-colorborder-inline-end-color が要素の他の境界色を定義します。

<'color'>

境界の色です。 color を参照してください。

公式定義

初期値currentcolor
適用対象すべての要素
継承なし
計算値色の計算値
アニメーションの種類計算値の型による

形式文法

border-inline-start-color = 
<color> |
<image-1D>

<image-1D> =
<stripes()>

<stripes()> =
stripes( <color-stripe># )

<color-stripe> =
<color> &&
[ <length-percentage> | <flex> ]?

<length-percentage> =
<length> |
<percentage>

HTML

html
<div>
  <p class="exampleText">Example text</p>
</div>

CSS

css
div {
  background-color: yellow;
  width: 120px;
  height: 120px;
}

.exampleText {
  writing-mode: vertical-lr;
  border: 10px solid blue;
  border-inline-start-color: red;
}

仕様書

Specification
CSS Logical Properties and Values Level 1
# border-color

ブラウザーの互換性

関連情報