탐색

v2.1.0
탐색

내비게이션 목록

사이드바나 설정 페이지에서 이동할 곳을 세로로 나열하는 목록으로, 현재 항목이 살짝 떠올라 보입니다.

이 페이지의 내용

내비게이션 목록은 사이드바나 설정 페이지에서 이동할 곳을 세로로 나열하는 컴포넌트입니다. 각 행은 상호작용하기 전까지 두드러지지 않으며, 현재 페이지를 가리키는 행은 세그먼트 컨트롤의 현재 옵션처럼 작은 표면이 살짝 떠 있는 형태로 표시됩니다. <nav>에는 .nav 클래스를, 각 링크에는 nav-item 클래스를 적용합니다.

내비게이션 목록

<div class="tray max-w(240) mx-auto p(8)">  <nav class="nav" aria-label="Workspace">    <a class="nav-item" href="#overview" aria-current="page">      <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">        <path d="M3 13L3 6.9624A1 1 0 0 1 3.3524 6.2005L7.3524 2.8005A1 1 0 0 1 8.6476 2.8005L12.6476 6.2005A1 1 0 0 1 13 6.9624L13 13A1 1 0 0 1 12 14L4 14A1 1 0 0 1 3 13Z" /><path d="M6.5 14L6.5 11A1 1 0 0 1 7.5 10L8.5 10A1 1 0 0 1 9.5 11L9.5 14" />      </svg> Overview    </a>    <a class="nav-item" href="#projects">      <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">        <rect x="2.5" y="2.5" width="4" height="4" rx="1" /><rect x="9.5" y="2.5" width="4" height="4" rx="1" /><rect x="2.5" y="9.5" width="4" height="4" rx="1" /><rect x="9.5" y="9.5" width="4" height="4" rx="1" />      </svg> Projects <span class="nav-end">12</span>    </a>    <a class="nav-item" href="#domains">      <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">        <circle cx="8" cy="8" r="6" /><path d="M8.7707 2.0497A6.0005 6.0005 0 0 0 7.2293 2.0497Q6.1162 3.1938 5.4813 4.6077Q4.8542 6.0044 4.7648 7.5H2.0209A5.9913 5.9913 0 0 0 2.0209 8.5H4.7648Q4.8542 9.9956 5.4813 11.3923Q6.1162 12.8062 7.2293 13.9503A6.0005 6.0005 0 0 0 8.7707 13.9503Q9.8838 12.8062 10.5187 11.3923Q11.1458 9.9956 11.2352 8.5H13.9791A5.9913 5.9913 0 0 0 13.9791 7.5H11.2352Q11.1458 6.0044 10.5187 4.6077Q9.8838 3.1938 8.7707 2.0497ZM9.6064 5.0173Q10.1455 6.2181 10.2331 7.5H5.7669Q5.8545 6.2181 6.3936 5.0173Q6.971 3.7314 8 2.6921Q9.029 3.7314 9.6064 5.0173ZM6.3936 10.9827Q5.8545 9.7819 5.7669 8.5H10.2331Q10.1455 9.7819 9.6064 10.9827Q9.029 12.2686 8 13.3079Q6.971 12.2686 6.3936 10.9827Z" fill="currentColor" stroke="none" fill-rule="evenodd" />      </svg> Domains    </a>    <a class="nav-item" aria-disabled="true">      <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">        <rect x="1.6667" y="3.3333" width="12.6667" height="9.3333" rx="1" /><path d="M1.6667 6.6667L14.3333 6.6667" /><path d="M4 10L6.6667 10" />      </svg> Billing    </a>  </nav></div>
import HomeIcon from '@master/icons-react/native/16/soft/home'import GridIcon from '@master/icons-react/native/16/soft/grid'import GlobeIcon from '@master/icons-react/native/16/soft/globe'import CreditCardIcon from '@master/icons-react/native/16/soft/credit-card'<div className="tray max-w(240) mx-auto p(8)">  <nav className="nav" aria-label="Workspace">    <a className="nav-item" href="#overview" aria-current="page">      <HomeIcon className="icon" /> Overview    </a>    <a className="nav-item" href="#projects">      <GridIcon className="icon" /> Projects <span className="nav-end">12</span>    </a>    <a className="nav-item" href="#domains"><GlobeIcon className="icon" /> Domains</a>    <a className="nav-item" aria-disabled="true"><CreditCardIcon className="icon" /> Billing</a>  </nav></div>
<script>  import HomeIcon from '@master/icons-svelte/native/16/soft/home'  import GridIcon from '@master/icons-svelte/native/16/soft/grid'  import GlobeIcon from '@master/icons-svelte/native/16/soft/globe'  import CreditCardIcon from '@master/icons-svelte/native/16/soft/credit-card'</script><div class="tray max-w(240) mx-auto p(8)">  <nav class="nav" aria-label="Workspace">    <a class="nav-item" href="#overview" aria-current="page"><HomeIcon class="icon" /> Overview</a>    <a class="nav-item" href="#projects">      <GridIcon class="icon" /> Projects <span class="nav-end">12</span>    </a>    <a class="nav-item" href="#domains"><GlobeIcon class="icon" /> Domains</a>    <a class="nav-item" aria-disabled="true"><CreditCardIcon class="icon" /> Billing</a>  </nav></div>
<script setup>import HomeIcon from '@master/icons-vue/native/16/soft/home'import GridIcon from '@master/icons-vue/native/16/soft/grid'import GlobeIcon from '@master/icons-vue/native/16/soft/globe'import CreditCardIcon from '@master/icons-vue/native/16/soft/credit-card'</script><template>  <div class="tray max-w(240) mx-auto p(8)">    <nav class="nav" aria-label="Workspace">      <a class="nav-item" href="#overview" aria-current="page">        <HomeIcon class="icon" /> Overview      </a>      <a class="nav-item" href="#projects">        <GridIcon class="icon" /> Projects <span class="nav-end">12</span>      </a>      <a class="nav-item" href="#domains"><GlobeIcon class="icon" /> Domains</a>      <a class="nav-item" aria-disabled="true"><CreditCardIcon class="icon" /> Billing</a>    </nav>  </div></template>

#레이블과 개수

nav-label은 행 묶음에 제목을 붙이며, 제목은 그 아래 행에 속합니다. 제목 위 여백은 행 사이 간격의 몇 배라서 앞 묶음과 나뉘고, 아래 여백은 작아서 제목이 이끄는 행과 함께 읽힙니다. 목록 맨 앞에 오면 위 여백을 조금만 둡니다. nav-end 클래스는 행 끝에 개수, 단축키 또는 배지를 배치하며, 0부터 9까지의 숫자 글자는 모두 같은 너비로 표시합니다.

레이블과 개수

<nav class="nav max-w(240) mx-auto" aria-label="Inbox">  <div class="nav-label">Inbox</div>  <a class="nav-item" href="#unread" aria-current="page">Unread <span class="nav-end">24</span></a>  <a class="nav-item" href="#mentions">Mentions <span class="nav-end">3</span></a>  <a class="nav-item" href="#archive">Archive</a>  <div class="nav-label">Teams</div>  <a class="nav-item" href="#design">Design</a>  <a class="nav-item" href="#engineering">    Engineering <span class="badge badge-sm nav-end">New</span>  </a></nav>
<nav className="nav max-w(240) mx-auto" aria-label="Inbox">  <div className="nav-label">Inbox</div>  <a className="nav-item" href="#unread" aria-current="page">    Unread <span className="nav-end">24</span>  </a>  <a className="nav-item" href="#mentions">Mentions <span className="nav-end">3</span></a>  <a className="nav-item" href="#archive">Archive</a>  <div className="nav-label">Teams</div>  <a className="nav-item" href="#design">Design</a>  <a className="nav-item" href="#engineering">    Engineering <span className="badge badge-sm nav-end">New</span>  </a></nav>
<nav class="nav max-w(240) mx-auto" aria-label="Inbox">  <div class="nav-label">Inbox</div>  <a class="nav-item" href="#unread" aria-current="page">Unread <span class="nav-end">24</span></a>  <a class="nav-item" href="#mentions">Mentions <span class="nav-end">3</span></a>  <a class="nav-item" href="#archive">Archive</a>  <div class="nav-label">Teams</div>  <a class="nav-item" href="#design">Design</a>  <a class="nav-item" href="#engineering">    Engineering <span class="badge badge-sm nav-end">New</span>  </a></nav>
<template>  <nav class="nav max-w(240) mx-auto" aria-label="Inbox">    <div class="nav-label">Inbox</div>    <a class="nav-item" href="#unread" aria-current="page">      Unread <span class="nav-end">24</span>    </a>    <a class="nav-item" href="#mentions">Mentions <span class="nav-end">3</span></a>    <a class="nav-item" href="#archive">Archive</a>    <div class="nav-label">Teams</div>    <a class="nav-item" href="#design">Design</a>    <a class="nav-item" href="#engineering">      Engineering <span class="badge badge-sm nav-end">New</span>    </a>  </nav></template>

#그룹

그룹에는 nav-group 클래스를 지정한 네이티브 <details> 요소를 사용합니다. <summary>는 nav-item과 nav-toggle 클래스를 적용한 행으로, 끝에 nav-chevron 아이콘을 담습니다. 아래 행은 nav-sub 안에 배치하고 가는 안내선을 따라 들여씁니다. 브라우저에서 펼치기와 접기, 키보드 조작을 처리합니다. 페이지 내 검색에서 접힌 그룹 안에 검색어와 일치하는 내용이 있으면 해당 그룹이 펼쳐집니다. 브라우저가 interpolate-size 속성을 지원하면 그룹이 콘텐츠 높이까지 부드럽게 열리며, 그 외 브라우저에서는 즉시 열립니다.

그룹

<nav class="nav max-w(240) mx-auto" aria-label="Project">  <a class="nav-item" href="#overview">    <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">      <path d="M3 13L3 6.9624A1 1 0 0 1 3.3524 6.2005L7.3524 2.8005A1 1 0 0 1 8.6476 2.8005L12.6476 6.2005A1 1 0 0 1 13 6.9624L13 13A1 1 0 0 1 12 14L4 14A1 1 0 0 1 3 13Z" /><path d="M6.5 14L6.5 11A1 1 0 0 1 7.5 10L8.5 10A1 1 0 0 1 9.5 11L9.5 14" />    </svg> Overview  </a>  <details class="nav-group" open>    <summary class="nav-item nav-toggle">      <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">        <path d="M7.5892 2.215A0.4996 0.4996 0 0 0 7.5 2.5L7.5006 10.0245A0.5 0.5 0 0 0 8.4946 10.0734L8.5 10L8.4986 2.4621A0.5007 0.5007 0 0 0 8.4108 2.215A0.7044 0.7044 0 0 0 7.5892 2.215Z" fill="currentColor" stroke="none" fill-rule="evenodd" /><path d="M5 5.5L7.8586 2.6414A0.2 0.2 0 0 1 8.1414 2.6414L11 5.5" /><path d="M2.5 10.5L2.5 12.5A1 1 0 0 0 3.5 13.5L12.5 13.5A1 1 0 0 0 13.5 12.5L13.5 10.5" />      </svg> Deployments<svg class="icon nav-chevron" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">        <path d="M6 3.5L10.3586 7.8586A0.2 0.2 0 0 1 10.3586 8.1414L6 12.5" transform="rotate(90 8 8)" />      </svg>    </summary>    <div class="nav-sub">      <a class="nav-item" href="#production" aria-current="page">Production</a>      <a class="nav-item" href="#preview">Preview</a>    </div>  </details>  <details class="nav-group">    <summary class="nav-item nav-toggle">      <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">        <path d="M2.5 4.5L4.5 4.5" /><circle cx="6" cy="4.5" r="1.5" /><path d="M7.5 4.5L13.5 4.5" /><path d="M2.5 11.5L8.5 11.5" /><circle cx="10" cy="11.5" r="1.5" /><path d="M11.5 11.5L13.5 11.5" />      </svg> Settings<svg class="icon nav-chevron" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">        <path d="M6 3.5L10.3586 7.8586A0.2 0.2 0 0 1 10.3586 8.1414L6 12.5" transform="rotate(90 8 8)" />      </svg>    </summary>    <div class="nav-sub">      <a class="nav-item" href="#general">General</a>      <a class="nav-item" href="#environment">Environment</a>    </div>  </details></nav>
import HomeIcon from '@master/icons-react/native/16/soft/home'import UploadIcon from '@master/icons-react/native/16/soft/upload'import ChevronDownIcon from '@master/icons-react/native/16/soft/chevron-down'import SlidersIcon from '@master/icons-react/native/16/soft/sliders'<nav className="nav max-w(240) mx-auto" aria-label="Project">  <a className="nav-item" href="#overview"><HomeIcon className="icon" /> Overview</a>  <details className="nav-group" open>    <summary className="nav-item nav-toggle">      <UploadIcon className="icon" /> Deployments<ChevronDownIcon className="icon nav-chevron" />    </summary>    <div className="nav-sub">      <a className="nav-item" href="#production" aria-current="page">Production</a>      <a className="nav-item" href="#preview">Preview</a>    </div>  </details>  <details className="nav-group">    <summary className="nav-item nav-toggle">      <SlidersIcon className="icon" /> Settings<ChevronDownIcon className="icon nav-chevron" />    </summary>    <div className="nav-sub">      <a className="nav-item" href="#general">General</a>      <a className="nav-item" href="#environment">Environment</a>    </div>  </details></nav>
<script>  import HomeIcon from '@master/icons-svelte/native/16/soft/home'  import UploadIcon from '@master/icons-svelte/native/16/soft/upload'  import ChevronDownIcon from '@master/icons-svelte/native/16/soft/chevron-down'  import SlidersIcon from '@master/icons-svelte/native/16/soft/sliders'</script><nav class="nav max-w(240) mx-auto" aria-label="Project">  <a class="nav-item" href="#overview"><HomeIcon class="icon" /> Overview</a>  <details class="nav-group" open>    <summary class="nav-item nav-toggle">      <UploadIcon class="icon" /> Deployments<ChevronDownIcon class="icon nav-chevron" />    </summary>    <div class="nav-sub">      <a class="nav-item" href="#production" aria-current="page">Production</a>      <a class="nav-item" href="#preview">Preview</a>    </div>  </details>  <details class="nav-group">    <summary class="nav-item nav-toggle">      <SlidersIcon class="icon" /> Settings<ChevronDownIcon class="icon nav-chevron" />    </summary>    <div class="nav-sub">      <a class="nav-item" href="#general">General</a>      <a class="nav-item" href="#environment">Environment</a>    </div>  </details></nav>
<script setup>import HomeIcon from '@master/icons-vue/native/16/soft/home'import UploadIcon from '@master/icons-vue/native/16/soft/upload'import ChevronDownIcon from '@master/icons-vue/native/16/soft/chevron-down'import SlidersIcon from '@master/icons-vue/native/16/soft/sliders'</script><template>  <nav class="nav max-w(240) mx-auto" aria-label="Project">    <a class="nav-item" href="#overview"><HomeIcon class="icon" /> Overview</a>    <details class="nav-group" open>      <summary class="nav-item nav-toggle">        <UploadIcon class="icon" /> Deployments<ChevronDownIcon class="icon nav-chevron" />      </summary>      <div class="nav-sub">        <a class="nav-item" href="#production" aria-current="page">Production</a>        <a class="nav-item" href="#preview">Preview</a>      </div>    </details>    <details class="nav-group">      <summary class="nav-item nav-toggle">        <SlidersIcon class="icon" /> Settings<ChevronDownIcon class="icon nav-chevron" />      </summary>      <div class="nav-sub">        <a class="nav-item" href="#general">General</a>        <a class="nav-item" href="#environment">Environment</a>      </div>    </details>  </nav></template>

#접근성

  • 레이블을 지정한 <nav> 요소로 목록을 감싸고, aria-current="page"로 현재 페이지를 표시합니다.
  • 사용할 수 없는 링크에는 aria-disabled="true"를 지정하고 href 속성을 제거합니다.
  • 페이지 안에서 같은 계층의 페이지 사이를 이동할 때는 탭을, 페이지 위에 현재 위치의 경로를 표시할 때는 브레드크럼을 사용합니다.

#클래스

클래스설명
nav목록은 레이블이 지정된 nav에 둡니다.
nav-item이동 항목은 링크, 버튼 또는 그룹의 summary 요소입니다. 상호작용하기 전에는 강조를 줄이고, 현재 항목은 살짝 떠 있는 작은 표면처럼 표시합니다.
nav-end행 끝에 표시하는 개수, 단축키 또는 배지로, 숫자는 고정폭으로 표시합니다.
nav-label여러 행 위에 낮은 강조도로 표시하는 캡션입니다. 앞 묶음보다 자신이 이끄는 행에 더 가깝게 놓입니다.
nav-group요약 아래에 여러 행을 접어 두는 details입니다.
nav-toggle그룹의 summary에서 행 끝에 그룹의 꺾쇠 아이콘을 담는 행입니다. 그룹이 열려 있는 동안 아이콘이 반대 방향을 향합니다.적용할 클래스는 nav-item입니다
nav-chevron그룹의 summary 끝에 있는 꺾쇠 아이콘입니다. 그룹이 열려 있는 동안 반대 방향을 향합니다.
nav-sub그룹 아래의 행은 아이콘 열보다 안쪽으로 들여쓰고 가는 안내선에 맞춥니다

#사용자 지정 속성

속성기본값설명
--nav-item-height2rem행 높이. 터치 화면에서는 최소 2.75rem입니다.
--nav-item-radiusvar(--radius-control-sm)행 모서리 반경

#소스

@master/ui/components/nav.css
/* * Nav: a vertical list of destinations for a sidebar or a settings page. * Rows are quiet until touched; the current one rises as a small sheet, the way the current option of a * segmented control does. A group is a native <details>, so it folds without script. */@layer components.ui {  .nav {    --nav-item-height: 2rem;    --nav-item-radius: var(--radius-control-sm);    --icon-size: 1rem;    display: flex;    flex-direction: column;    gap: 2px;    min-width: 0;    margin: 0;    padding: 0;    font-size: .84375rem;    line-height: 1.2;    list-style: none;  }  /* A destination: a link with aria-current="page", a button, or the <summary> of a group. */  .nav-item {    --icon-offset: -.0625rem;    --icon-color: var(--color-text-muted);    position: relative;    display: flex;    align-items: center;    gap: .625rem;    min-width: 0;    min-height: var(--nav-item-height);    margin: 0;    /* One line is centred by the height; the block padding shows only when a label wraps, and keeps it off the edge. */    padding: .25rem .5rem;    border: 0;    border-radius: calc(var(--nav-item-radius) * var(--corner-scale));    corner-shape: var(--corner-shape);    background: transparent;    color: var(--color-text-body);    font: inherit;    font-feature-settings: inherit;    text-align: start;    text-decoration: none;    list-style: none;    appearance: none;    user-select: none;    -webkit-user-select: none;    -webkit-tap-highlight-color: transparent;    overflow-wrap: anywhere;    cursor: pointer;    touch-action: manipulation;    &::-webkit-details-marker {      display: none;    }    /* A row answers at once: no fade between rows as the pointer travels. */    @media (hover: hover) {      &:hover:not([aria-current="page"], [aria-selected="true"], :disabled, [aria-disabled="true"]) {        --icon-color: currentColor;        background: var(--color-surface-chip);        color: var(--color-text-strong);      }    }    /* Pressed: a step deeper than the pointer's tone, so a tap is answered where there is no pointer. */    &:active:not([aria-current="page"], [aria-selected="true"], :disabled, [aria-disabled="true"]) {      background: var(--color-surface-inset-hover);      color: var(--color-text-strong);    }    &:is([aria-current="page"], [aria-selected="true"]) {      --icon-color: currentColor;      @apply --surface-sheet;      color: var(--color-text-strong);      box-shadow: var(--shadow-raised);    }    /* The keys leave an ink outline inside the row, as in a menu, so focus and hover stay different facts. */    &:focus-visible {      outline: 2px solid var(--color-focus);      outline-offset: -2px;    }    &:is(:disabled, [aria-disabled="true"]) {      --icon-color: currentColor;      color: var(--color-text-disabled);      cursor: not-allowed;    }    @media (pointer: coarse) {      min-height: max(var(--nav-item-height), 2.75rem);    }    @media (forced-colors: active) {      &:is([aria-current="page"], [aria-selected="true"]) {        outline: 2px solid Highlight;        outline-offset: -2px;      }      /* Written after the current row's outline, of equal weight, so the row the keys are on still says so. */      &:focus-visible {        outline-color: CanvasText;      }      &:is(:disabled, [aria-disabled="true"]) {        color: GrayText;      }    }  }  /* A count, a shortcut or a badge at the end of a row. */  .nav-end {    margin-inline-start: auto;    padding-inline-start: .75rem;    color: var(--color-text-muted);    font-size: .75rem;    font-variant-numeric: tabular-nums;  }  /*   * A quiet caption over a set of rows. It belongs to the rows under it: the room above parts it from the set before,   * several times the 2px between rows, and the room below is small, so the caption reads with the set it leads.   * First in the list, it has nothing to part from and keeps only a little room.   */  .nav-label {    margin: 0;    padding: 1.25rem .5rem .25rem;    color: var(--color-text-muted);    font-size: .71875rem;    &:first-child {      padding-block-start: .25rem;    }  }  /* A <details> that folds a set of rows under its summary; the chevron turns over when it is open. */  .nav-group {    display: flex;    flex-direction: column;    gap: 2px;    min-width: 0;    interpolate-size: allow-keywords;    &::details-content {      block-size: 0;      overflow-y: clip;      opacity: 0;      transition-property: block-size, opacity, content-visibility;      transition-duration: var(--duration-base);      transition-timing-function: var(--easing-glide);      transition-behavior: allow-discrete;    }    &[open]::details-content {      block-size: auto;      opacity: 1;    }    &[open] .nav-toggle .nav-chevron {      rotate: x 180deg;    }    /* A closed group nested in an open one keeps its own chevron. */    &[open] .nav-group:not([open]) .nav-toggle .nav-chevron {      rotate: none;    }    @media (prefers-reduced-motion: reduce) {      &::details-content {        transition-property: opacity, content-visibility;      }    }  }  /* The summary of a group: a row with a chevron at its end. */  .nav-toggle .nav-chevron {    flex: none;    width: .875rem;    height: .875rem;    /* At the end of the row, without the offset a row gives its leading icon. */    margin-inline: auto 0;    color: var(--color-text-muted);    transition: rotate var(--duration-base) var(--easing-glide);    @media (prefers-reduced-motion: reduce) {      transition: none;    }    /* The chevron is a fill cut by a mask: kept out of forced colors, or the canvas would paint over it. */    @media (forced-colors: active) {      color: CanvasText;    }  }  /*   * A folded group that holds the current page says so on its own row: strong ink and a dot before the chevron,   * so the way to the current page stays in sight, apart from a group that is merely open. Beside a nav-end the   * dot follows it instead of sharing the free space with it.   */  .nav-group:not([open]):has(.nav-item[aria-current="page"]) .nav-toggle {    --icon-color: currentColor;    color: var(--color-text-strong);    &::before {      content: '';      flex: none;      order: 1;      width: .3125rem;      height: .3125rem;      margin-inline-start: auto;      border-radius: 50%;      corner-shape: round;      background: currentColor;    }    &:has(.nav-end)::before {      margin-inline-start: .5rem;    }    &::after {      order: 2;      margin-inline-start: .375rem;    }    /* The dot is a fill: kept out of forced colors, as the chevron is, or the canvas would paint over it. */    @media (forced-colors: active) {      &::before {        forced-color-adjust: none;        background: CanvasText;      }    }  }  /* Rows under a group, set in from the icon column on a hairline guide. */  .nav-sub {    display: flex;    flex-direction: column;    gap: 2px;    margin-block: 2px;    margin-inline: calc(.5rem + var(--icon-size) / 2) 0;    padding-block: 0;    padding-inline: calc(.625rem + var(--icon-size) / 2 - 1px) 0;    border-inline-start: 1px solid var(--color-line-hair);    list-style: none;  }}