Skip to content

CSS: view

.instui-view — View 原语:一个中性框,带有用于背景、边框、圆角、阴影、显示、定位、溢出和光标的键值修饰符。所有这些修饰符也可在全局使用(裸用,或链接到任何其他组件)— 参见 background/border/shadow/display/position/overflow/cursor 工具。

Source: view.css

用法

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

示例

html
<div class="instui-view -background-secondary -border-radius-medium -shadow-resting">
  A card-like surface.
</div>

修饰符

修饰符描述
.-background-alert警示(Alert)表面背景。
.-background-brand品牌(Brand)表面背景。
.-background-danger危险(Danger)表面背景。
.-background-info信息(Info)表面背景。
.-background-primary主色(Primary)表面背景。
.-background-primary-inverse主色反转(Inverse primary)表面背景。
.-background-secondary次要(Secondary)表面背景。
.-background-success成功(Success)表面背景。
.-background-transparent透明背景。
.-background-warning警告(Warning)表面背景。
.-border-color-brand品牌描边(Brand stroke)边框颜色。
.-border-color-danger错误(Error)描边边框颜色。
.-border-color-info信息(Info)描边边框颜色。
.-border-color-primary基础(Base)描边边框颜色。
.-border-color-success成功(Success)描边边框颜色。
.-border-color-warning警告(Warning)描边边框颜色。
.-border-radius-circle完全圆形(50%)半径。
.-border-radius-large大角半径。
.-border-radius-medium中等角半径。
.-border-radius-pill胶囊(Pill,全圆)半径。
.-border-radius-small小角半径。
.-border-width-large大号实线边框,使用基础描边颜色。
.-border-width-medium中号实线边框,使用基础描边颜色。
.-border-width-small小号实线边框,使用基础描边颜色。
.-cursor-autocursor: auto.
.-cursor-defaultcursor: default.
.-cursor-grabcursor: grab.
.-cursor-movecursor: move.
.-cursor-not-allowedcursor: not-allowed.
.-cursor-pointercursor: pointer.
.-cursor-textcursor: text.
.-cursor-waitcursor: wait.
.-display-blockdisplay: block.
.-display-flexdisplay: flex.
.-display-inlinedisplay: inline.
.-display-inline-blockdisplay: inline-block.
.-display-inline-flexdisplay: inline-flex.
.-display-nonedisplay: none.
.-overflow-x-autooverflow-x: auto.
.-overflow-x-clipoverflow-x: clip.
.-overflow-x-hiddenoverflow-x: hidden.
.-overflow-x-scrolloverflow-x: scroll.
.-overflow-x-visibleoverflow-x: visible.
.-overflow-y-autooverflow-y: auto.
.-overflow-y-clipoverflow-y: clip.
.-overflow-y-hiddenoverflow-y: hidden.
.-overflow-y-scrolloverflow-y: scroll.
.-overflow-y-visibleoverflow-y: visible.
.-position-absoluteposition: absolute.
.-position-fixedposition: fixed.
.-position-relativeposition: relative.
.-position-staticposition: static.
.-position-stickyposition: sticky.
.-shadow-above较高(Above)抬升阴影。
.-shadow-resting静态(Resting)抬升阴影。
.-shadow-topmost最顶层(Topmost)抬升阴影。

消耗代币

Token类型
--instui-border-radius-full<length>999rem
--instui-border-radius-lg<length>0.75rem
--instui-border-radius-md<length>0.5rem
--instui-border-radius-sm<length>0.25rem
--instui-border-width-lg<length>0.25rem
--instui-border-width-md<length>0.125rem
--instui-border-width-sm<length>0.0625rem
--instui-color-stroke-base<color>LightDarklight-dark(#8D959F, #6A7883)
--instui-color-stroke-brand<color>LightDarklight-dark(#1D354F, #EEF4FD)
--instui-color-stroke-error<color>#E62429
--instui-color-stroke-info<color>#2B7ABC
--instui-color-stroke-success<color>#03893D
--instui-color-stroke-warning<color>#CF4A00
--instui-component-view-background-alert<color>#2B7ABC
--instui-component-view-background-brand<color>LightDarklight-dark(#1D354F, #EEF4FD)
--instui-component-view-background-danger<color>#E62429
--instui-component-view-background-info<color>#2B7ABC
--instui-component-view-background-primary<color>LightDarklight-dark(#ffffff, #171B21)
--instui-component-view-background-primary-inverse<color>LightDarklight-dark(#334450, #F2F4F5)
--instui-component-view-background-secondary<color>LightDarklight-dark(#F2F4F5, #273540)
--instui-component-view-background-success<color>#03893D
--instui-component-view-background-warning<color>#CF4A00
--instui-elevation-abovenone | <shadow>#
--instui-elevation-restingnone | <shadow>#
--instui-elevation-topmostnone | <shadow>#