Skip to content

CSS: drawer-layout.tray ​

.tray — Y panel ochr wrth ymyl y prif gynnwys, gyda moddwyr overlay dewisol a moddwyr arwyneb tebyg i drôr.

Mae lleoli yn defnyddio inset-inline-start/inset-inline (er byth left/right), felly mae -placement-end yn glymu i'r ymyl olaf go iawn mewn LTR a RTL.

Hygyrchedd ​

Os caiff ei ddefnyddio fel llywio, rhowch ddolenni mewn <nav> semantig a darparwch enw hygyrch.

Defnydd ​

css
@import "@pantoken/components/components.css";
@import "@pantoken/components/drawer-layout.tray.css";

Enghreifftiau ​

html
<div class="instui-drawer-layout" open>
  <aside class="tray" aria-label="Course navigation">
    <a class="instui-link" href="#">Modiwlau</a>
  </aside>
  <main class="content" role="region">Prif gynnwys</main>
</div>

Strwythur ​

text
@scope (@component drawer-layout)
  .tray
    ‹content›
flowchart TD subgraph sg0 ["@scope (@component drawer-layout)"] n1(".tray"):::cssdoc-part n2[/"‹content›"/]:::cssdoc-slot end n1 --> n2 classDef cssdoc-root stroke-width:1px; classDef cssdoc-part stroke-width:1px; classDef cssdoc-slot stroke-width:1px; classDef cssdoc-component stroke-width:1px;

Modyfiwyr ​

ModyfiwrDisgrifiad
.-placement-endGlymwch y drôr hwn at inline-end pan fo modd overlay yn weithredol.
.-without-borderTynnwch ffin ymyl y panel.
.-without-shadowTynnwch y codiad pan fo modd overlay yn weithredol.

Amodau ​

MathYmchwiliadDisgrifiad
containerpantoken-drawer-layout (max-width: 64em)—

Tocynnau a ddefnyddiwyd ​

TokenMathGwerth
--drawer-layout-tray-width——
--instui-border-width-sm<length>0.0625rem
--instui-color-background-elevated-surface-base<color>LightDarklight-dark(#ffffff, #171B21)
--instui-color-stroke-base<color>LightDarklight-dark(#8D959F, #6A7883)
--instui-component-tray-width-xs<length>16em
--instui-component-tray-z-index<integer>9999
--instui-elevation-topmostnone | <shadow>#—

Perthnasol ​