Skip to content

CSS: card ​

.instui-card · stable — מיכל משטח המקבל תוכן כלשהו.

base הוא המשטח המוגבה ברירת המחדל. השתמש nested עבור כרטיס ממוסגר בתוך כרטיס בסיס. ה-padding ורדיוסי הפינות מתאימים לרוחב הכרטיס עצמו; סימון ישן ללא עטיפת .content משתמש בנקודות שבירה של חלון התצוגה.

Source: card.css

נגישות ​

השתמשו ב-<article> כאלמנט הכרטיס כאשר הכרטיס הוא יחידת תוכן עצמאית; השתמשו ב-<section> כשם שהוא מקובץ בתוך אזור סימן גדול יותר. ב--variant-container, העדיפו אלמנטים מסוג <section> כילדים ישירים כך שכל אזור ממוסגר יקבל משמעות סמנטית.

שימוש ​

@import "@pantoken/components/components.css";

css
@import "@pantoken/components/components.css";
@import "@pantoken/components/card.css";

דוגמאות ​

כרטיס מיכל

html
<article class="instui-card -variant-base">
  <div class="content">
    <section class="instui-card -variant-nested">
      <div class="content">חלק ראשון</div>
    </section>
    <section class="instui-card -variant-nested">
      <div class="content">חלק שני</div>
    </section>
  </div>
</article>

מחליפים ​

מחליףתיאור
.-variant-baseכרטיס תוכן סטנדרטי; הילדים ללא עיצוב. ברירת המחדל כאשר לא מוגדר וריאנט.
.-variant-containerמופרט — use .-variant-nested.
.-variant-contentמופרט — use .-variant-base.
.-variant-nestedמשטח גבול בלבד לכרטיס בתוך כרטיס בסיס.

תנאים ​

סוגשאילתהתיאור
container(width >=20rem)—
container(width >=40rem)—
media(min-width: 20rem)—
media(min-width: 40rem)—

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

Tokenסוגערך
--instui-component-card-background-color<color>LightDarklight-dark(#ffffff, #1C222B)
--instui-component-card-border-radius-base-lg<length>1rem
--instui-component-card-border-radius-base-md<length>1rem
--instui-component-card-border-radius-base-sm<length>0.75rem
--instui-component-card-border-radius-nested-lg<length>0.75rem
--instui-component-card-border-radius-nested-md<length>0.5rem
--instui-component-card-border-radius-nested-sm<length>0.5rem
--instui-component-card-nested-border-color<color>LightDarklight-dark(#E8EAEC, #2D3D49)
--instui-component-card-padding-base-lg<length>1.5rem
--instui-component-card-padding-base-md<length>1rem
--instui-component-card-padding-base-sm<length>0.75rem
--instui-component-card-padding-nested-lg<length>1rem
--instui-component-card-padding-nested-md<length>0.75rem
--instui-component-card-padding-nested-sm<length>0.5rem
--instui-component-shared-tokens-spacing-gap-cards-nested-containers-lg<length>1rem
--instui-component-shared-tokens-spacing-gap-cards-nested-containers-md<length>0.75rem
--instui-component-shared-tokens-spacing-gap-cards-nested-containers-sm<length>0.5rem
--instui-component-shared-tokens-stroke-width-sm<length>0.0625rem
--instui-elevation-cardnone | <shadow>#—