Skip to content

CSS: table ​

.instui-table — He ripanga raraunga kua whakapaipai mō th me td me tētahi taitara kōwhiringa, ā, he āhua hover, whakarite, me ngā tatauranga kāri tūpapa.

Mō -layout-stacked, kāore e taea e te CSS māmā te kukume i te kuputu o ia upoko tīwae ki roto i tōna pūtau, nō reira hoatu he data-label ki ia pūtau, ā, ka whakaatu te kāri tūpapa i taua mea mā te ::before. Tirohia ngā mema table.head, table.body, table.row, table.cell, table.col-header, me table.row-header mō ngā wāhanga takitahi.

Source: body.css

Wātea mō te katoa ​

Tūhuratia te ripanga ki tētahi <caption>, tohuia ngā upoko tīwae kia <th scope="col"> me ngā upoko rārangi kia <th scope="row">, ā, i roto i te -layout-stacked hoatu he data-label ki ia pūtau i te mea kua huna ā-āhua te rārangi upoko.

Ngā Whakamahi ​

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

Ngā tauira ​

html
<table class="instui-table -hover">
  <caption>Ngā kiriata tino pai</caption>
  <thead>
    <tr>
      <th scope="col">Tūnga</th>
      <th scope="col">Taitara</th>
      <th scope="col">Tau</th>
      <th scope="col">Whakatauranga</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th scope="row">1</th>
      <td>Te Whakaoranga o Shawshank</td>
      <td>1994</td>
      <td>9.3</td>
    </tr>
    <tr>
      <th scope="row">2</th>
      <td>Te Matua Whāngai</td>
      <td>1972</td>
      <td>9.2</td>
    </tr>
    <tr>
      <th scope="row">3</th>
      <td>Te Matua Whāngai: Wāhanga II</td>
      <td>1974</td>
      <td>9.0</td>
    </tr>
  </tbody>
</table>

Hanganga ​

text
.instui-table.-hover
  caption
  thead
    th
  tbody
    tr
      td, th[scope="row"]
flowchart TD n0[".instui-table.-hover"]:::cssdoc-root n1("caption"):::cssdoc-part n2("thead"):::cssdoc-part n3("th"):::cssdoc-part n4("tbody"):::cssdoc-part n5("tr"):::cssdoc-part n6("td, th[scope=&quot;row&quot;]"):::cssdoc-part n0 --> n1 n2 --> n3 n0 --> n2 n5 --> n6 n4 --> n5 n0 --> n4 classDef cssdoc-root stroke-width:1px; classDef cssdoc-part stroke-width:1px; classDef cssdoc-slot stroke-width:1px; classDef cssdoc-component stroke-width:1px;

Ngā Kaitī ​

KaiwhakatikatikaWhakamārama
.-hoverWhakaahuatia ngā rārangi i te pāhi (hover). @affects table.row — E rēhita ana, e tae ana hoki te taha ārai pāhi o te rārangi.
.-layout-fixedTe tukunga ripanga whakatika (ngā tīwae whanui ōrite).
.-layout-stackedTūpapaia ia rārangi hei kāri, mā te data-label mō ia pūtau. @affects table.head @affects table.body @affects table.row @affects table.cell @affects table.col-header @affects table.row-header — E tūpapa ana ia wāhanga hei tūblock, ā, ka huna/ka tapaina hoki te upoko i runga i te āhua.

Wāhanga ​

WāhangaWhakamārama
.captionHe taitara ripanga kōwhiringa.

Ngā tohu i whakamahia ​

TokenMomoUara
--instui-component-table-background<color>LightDarklight-dark(#ffffff, #10141A)
--instui-component-table-cell-padding-horizontal<length>0.75rem
--instui-component-table-cell-padding-vertical<length>0.5rem
--instui-component-table-col-header-color<color>LightDarklight-dark(#273540, #F2F4F5)
--instui-component-table-color<color>LightDarklight-dark(#273540, #ffffff)
--instui-component-table-font-family[ <font-family-name> | <generic-font-family> ]#Atkinson Hyperlegible Next, "Helvetica Neue", Helvetica, Arial, sans-serif
--instui-component-table-font-size<length>1rem
--instui-component-table-head-font-weight<integer>600

Ngā wāhanga-iti ​