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پس‌زمینهٔ سطح هشدار.
.-background-brandپس‌زمینهٔ سطح برند.
.-background-dangerپس‌زمینهٔ سطح خطر.
.-background-infoپس‌زمینهٔ سطح اطلاعات.
.-background-primaryپس‌زمینهٔ سطح اصلی (Primary).
.-background-primary-inverseپس‌زمینهٔ سطح معکوسِ اصلی.
.-background-secondaryپس‌زمینهٔ سطح ثانویه.
.-background-successپس‌زمینهٔ سطح موفقیت.
.-background-transparentپس‌زمینهٔ شفاف.
.-background-warningپس‌زمینهٔ سطح هشدار (Warning).
.-border-color-brandرنگ حاشیهٔ خطِ برند (Brand stroke).
.-border-color-dangerرنگ حاشیهٔ خطِ خطا (Error stroke).
.-border-color-infoرنگ حاشیهٔ خطِ اطلاعات (Info stroke).
.-border-color-primaryرنگ پایهٔ حاشیهٔ خط (Base stroke).
.-border-color-successرنگ حاشیهٔ خطِ موفقیت (Success stroke).
.-border-color-warningرنگ حاشیهٔ خطِ هشدار (Warning stroke).
.-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 elevation).
.-shadow-restingسایهٔ برآمدگیِ در حالت استراحت (Resting elevation).
.-shadow-topmostسایهٔ برآمدگیِ بالاترین لایه (Topmost elevation).

توکن‌های مصرف‌شده

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>#