Skip to content

CSS: popover ​

.instui-popover — He mata teitei mō te [popover] taketake, kua whakanohoia mā te tūnga punga CSS.

He tikanga Chromium-anake te tūnga punga; e tohu ana te kaitiaki @supports ka noho āta-tū ki te -placement-* i ērā atu wāhi, ā, ka whakanohohia e te UA te popover ki te paparanga runga i te pokapū, kaua e hē.

Source: popover.css

Ngā Whakamahi ​

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

Ngā tauira ​

html
<div class="instui-popover -placement-bottom" id="pop-1">
  <div class="instui-heading -level-h4">Toha tēnei whārangi</div>
  <p class="instui-text -size-sm">He mata māmā te popover e herea ana ki tētahi tīmatanga. Kei te whakamahi tēnei i te āhuatanga taketake <code>popover</code> āhuatanga.</p>
</div>

Hanganga ​

text
.instui-popover
  heading (component)
  text (component)
    code
flowchart TD n0[".instui-popover"]:::cssdoc-root n1(["heading"]):::cssdoc-component n2(["text"]):::cssdoc-component n3("code"):::cssdoc-part n0 --> n1 n2 --> n3 n0 --> n2 click n1 "/api/css/heading.md" click n2 "/api/css/text.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;

Ngā Kaitī ​

KaiwhakatikatikaWhakamārama
.-placement-bottomNoho i raro i te hono.
.-placement-endNoho i te mutunga (inline-end) o te hono.
.-placement-startNoho i te tīmatanga (inline-start) o te hono.
.-placement-topNoho i runga ake o te hono.

Ngā Conditions ​

MomoPātaiWhakamārama
supports(position-area: block-end)—
supports(transition-behavior: allow-discrete)—

Ngā tohu i whakamahia ​

TokenMomoUara
--instui-border-width-sm<length>0.0625rem
--instui-color-background-elevated-surface-base<color>LightDarklight-dark(#ffffff, #171B21)
--instui-color-text-base<color>LightDarklight-dark(#273540, #F2F4F5)
--instui-component-popover-border-color<color>LightDarklight-dark(#8D959F, #6A7883)
--instui-component-popover-border-radius<length>0.75rem
--instui-elevation-abovenone | <shadow>#—
--instui-spacing-space-sm<length>0.5rem

Tautoko pūtirotiro ​

  • Ka whakamahi i te tūnga punga CSS (position-anchor/position-area) me te API taketake [popover], e rua nei mō Chromium anake i tēnei wā; ko te kaitiaki @supports ka pupuri i te tūnga kia kore e mahi i ētahi atu wāhi, ā, i reira ka whakanohoia e te UA te popover ki te paparanga runga i te pokapū.

Ngā wāhanga-iti ​

Hono ​

  • tooltip — He tooltip he mata iti, ka puta i te wā e pāhia ana te tohu (hover) rānei ka aro ki tētahi mea (focus).
  • context-view — He context view he mata hono punga, e hono ana hoki ki tētahi maka tohu (pointer).