Skip to content

CSS: popover

.instui-popover — Yon sifas elve pou yon natif [popover], pozisyone ak pozisyonman ankra CSS.

Pozisyonman ankra sèlman disponib sou Chromium; gad @supports vle di -placement-* rete trankilman inaktif lòt kote epi UA a santre popover la nan kouch tèt la olye pou li echwe.

Source: popover.css

Itilizasyon

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

Egzanp

html
<div class="instui-popover -placement-bottom" id="pop-1">
  <div class="instui-heading -level-h4">Share this page</div>
  <p class="instui-text -size-sm">A popover is a lightweight surface anchored to a trigger. This one uses the native <code>popover</code> attribute.</p>
</div>

Estrikti

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;

Modifikatè

ModifikatèDeskripsyon
.-placement-bottomPlase anba ankre a.
.-placement-endPlase nan fen (inline-end) ankre a.
.-placement-startPlase nan kòmansman (inline-start) ankre a.
.-placement-topPlase anlè ankre a.

Kondisyon

TipRechèchDeskripsyon
supports(position-area: block-end)
supports(transition-behavior: allow-discrete)

Tokens konsome

TokenTipValè
--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

Sipò navigatè

  • Itilize pozisyonman ankra CSS (position-anchor/position-area) ak API natif [popover], toude sèlman sou Chromium jodi a; yon gad @supports kenbe plasman an inaktif lòt kote, kote UA a santre popover la nan kouch tèt la.

Sou-konpozan

Ki gen rapò

  • tooltip — Yon tooltip se yon sifas anchre ki pi piti, deklanche pa hover oswa pa fokus.
  • context-view — Context view se yon sifas anchre ki gen yon pwent.