CSS: calendar
.instui-calendar — Egy statikus havi rács navigációval, hétköznap fejlécekkel és nap cellákkal.
Az egyes napcellákhoz lásd a(z) calendar.day tagot.
Forrás: calendar.css
Akadálymentesség
Tárja fel a rácsot role="table" és egy leírással aria-label segítségével, és adjon minden navigációs gombnak a saját aria-label.
Használat
css
@import "@pantoken/components/components.css";
@import "@pantoken/components/calendar.css";Példák
html
<div class="instui-calendar" role="table" aria-label="March 2026">
<div class="nav">
<button class="instui-button -color-tertiary -shape-square -without-border -icon-chevron-left" aria-label="Previous month"></button>
<strong>March 2026</strong>
<button class="instui-button -color-tertiary -shape-square -without-border -icon-chevron-right" aria-label="Next month"></button>
</div>
<div class="grid">
<span class="weekday">Su</span>
<span class="weekday">Mo</span>
<span class="weekday">Tu</span>
<span class="weekday">We</span>
<span class="weekday">Th</span>
<span class="weekday">Fr</span>
<span class="weekday">Sa</span>
<span class="day -outside-month">23</span>
<span class="day -outside-month">24</span>
<span class="day -outside-month">25</span>
<span class="day -outside-month">26</span>
<span class="day -outside-month">27</span>
<span class="day -outside-month">28</span>
<span class="day">1</span>
<span class="day">2</span>
<span class="day">3</span>
<span class="day">4</span>
<span class="day">5</span>
<span class="day">6</span>
<span class="day -today">7</span>
<span class="day">8</span>
<span class="day">9</span>
<span class="day">10</span>
<span class="day">11</span>
<span class="day -selected">12</span>
<span class="day">13</span>
<span class="day">14</span>
<span class="day">15</span>
</div>
</div>Felépítés
text
.instui-calendar
.nav
button (component)
strong
.grid
.weekday
calendar.day (component, 0..n)flowchart TD
n0[".instui-calendar"]:::cssdoc-root
n1(".nav"):::cssdoc-part
n2(["button"]):::cssdoc-component
n3("strong"):::cssdoc-part
n4(".grid"):::cssdoc-part
n5(".weekday"):::cssdoc-part
n6(["calendar.day"]):::cssdoc-component
n1 --> n2
n1 --> n3
n0 --> n1
n4 --> n5
n4 -->|0..n| n6
n0 --> n4
click n2 "/api/css/button.md"
click n6 "/api/css/calendar.day.md"
classDef cssdoc-root stroke-width:1px;
classDef cssdoc-part stroke-width:1px;
classDef cssdoc-slot stroke-width:1px;
classDef cssdoc-component stroke-width:1px;
Részek
| Rész | Leírás |
|---|---|
.grid | A hét oszlopos napi rács. |
.nav | A havi navigációs sor. |
.weekday | Egy hétköznapi oszlopfejléc. |
Felhasznált tokenek
| Token | Típus | Érték |
|---|---|---|
--instui-component-calendar-background | <color> | LightDarklight-dark(#ffffff, #171B21) |
--instui-component-calendar-color | <color> | LightDarklight-dark(#273540, #ffffff) |
--instui-component-calendar-day-height | <length> | 2rem |
--instui-component-calendar-day-min-width | <length> | 2rem |
--instui-component-calendar-font-family | [ <font-family-name> | <generic-font-family> ]# | Atkinson Hyperlegible Next, "Helvetica Neue", Helvetica, Arial, sans-serif |
--instui-component-calendar-font-size | <length> | 1rem |
--instui-component-calendar-font-weight | <integer> | 600 |
--instui-component-calendar-line-height | <percentage> | 150% |
--instui-component-calendar-nav-margin | <length> | 0.75rem |
--instui-font-weight-interactive | <integer> | 500 |
--instui-spacing-space2xs | <length> | 0.125rem |