Skip to content

CSS: drawer-layout.content

.content — חלונית התוכן הראשית שממלאת את שאר המקום לצד המגש.

כאשר ה-inline-size של ההורה יורד מתחת ל-46em (16em רוחב המגש + 30em נקודת שבירה), שאילתת @container על מיכל ה-pantoken-drawer-layout של ההורה תוריד אוטומטית את min-inline-size של חבר זה ל-0, בהתאמה עם ההחלפה הידנית [should-overlay-tray].

נגישות

שמרו את role="region" (קונבנציית DrawerLayout של InstUI) וקראו לה בשם aria-label/aria-labelledby כאשר ההקשר לבדו אינו מזהה אותה.

שימוש

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

דוגמאות

html
<div class="instui-drawer-layout">
  <div class="content" role="region">
    <p class="instui-text">Tray content</p>
  </div>
</div>

מבנה

text
@scope (@component drawer-layout)
  .content
    ‹content›
flowchart TD subgraph sg0 ["@scope (@component drawer-layout)"] n1(".content"):::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;

תנאים

סוגשאילתהתיאור
containerpantoken-drawer-layout (max-width: 46em)

אסימוני צריכה

Tokenסוגערך
--drawer-layout-content-min-inline-size<length>
--pantoken-bp-md<length>30em

קשור