UNPKG

wetrade-design

Version:

一款多语言支持Vue3的UI框架

181 lines (180 loc) 3.98 kB
/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ /* stylelint-disable no-duplicate-selectors */ /* stylelint-disable */ /* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ /** gray-sp */ /** blue-sp */ /** green-sp */ /** red-sp */ /** orange-sp */ /** 品牌橙 */ /** 日落黄 */ /** 柠檬黄 */ /** 新生绿 */ /** 绿色 */ /** 碧涛青 */ /** 海蔚蓝 */ /** 品牌蓝色 */ /** 宝石蓝 */ /** 星空紫 */ /** 罗兰紫 */ /** 青春紫 */ /** 品红 */ /** 红色 */ /** 灰色 */ /** 保留ant色板 */ /** 绿色 */ /** 品牌蓝 */ .wd-switch { margin: 0; padding: 0; color: #1E1E29; font-size: 14px; font-variant: tabular-nums; line-height: 18px; list-style: none; font-feature-settings: 'tnum'; position: relative; display: inline-block; box-sizing: border-box; min-width: 44px; height: 24px; line-height: 24px; vertical-align: middle; background-color: #C7CBD6; border: 0; border-radius: 100px; cursor: pointer; transition: all 0.2s; -webkit-user-select: none; -moz-user-select: none; user-select: none; } .wd-switch:focus { outline: 0; } .wd-switch:focus:hover { box-shadow: none; } .wd-switch-checked { background-color: #2469F2; } .wd-switch-loading, .wd-switch-disabled { cursor: not-allowed; background-color: #F8F9FB; } .wd-switch-loading .wd-switch-inner, .wd-switch-disabled .wd-switch-inner { color: #C7CBD6; } .wd-switch-loading.wd-switch-checked, .wd-switch-disabled.wd-switch-checked { background-color: #93BEFB; } .wd-switch-loading.wd-switch-checked .wd-switch-inner, .wd-switch-disabled.wd-switch-checked .wd-switch-inner { color: #fff; } .wd-switch-loading *, .wd-switch-disabled * { box-shadow: none; cursor: not-allowed; } .wd-switch-disabled .wd-switch-handle::before { background-color: #656B80; } .wd-switch-inner { display: block; margin: 0 8px 0 27px; color: #fff; font-size: 12px; transition: margin 0.2s; } .wd-switch-checked .wd-switch-inner { margin: 0 27px 0 8px; } .wd-switch-handle { position: absolute; top: 4px; left: 4px; width: 16px; height: 16px; transition: all 0.2s ease-in-out; } .wd-switch-handle::before { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background-color: #fff; border-radius: 8px; box-shadow: 0px 0px 1px 0px rgba(255, 255, 255, 0.6), 0px 6px 28px 0px rgba(0, 0, 0, 0.3), 0px 6px 12px 0px rgba(0, 0, 0, 0.24); content: ''; } .wd-switch-checked .wd-switch-handle { left: calc(100% - 16px - 4px); } .wd-switch-loading-icon.wdicon { position: relative; top: 1px; color: #C7CBD6; vertical-align: top; animation: loadingCircle 1s infinite linear; } .wd-switch-checked .wd-switch-loading-icon { color: #93BEFB; } .wd-switch-small { min-width: 28px; height: 16px; line-height: 16px; } .wd-switch-small .wd-switch-inner { margin: 0 5px 0 18px; font-size: 12px; } .wd-switch-small .wd-switch-handle { width: 12px; height: 12px; top: 2px; left: 2px; } .wd-switch-small .wd-switch-loading-icon { top: 1px; font-size: 10px; } .wd-switch-small.wd-switch-checked .wd-switch-inner { margin: 0 18px 0 5px; } .wd-switch-small.wd-switch-checked .wd-switch-handle { left: calc(100% - 12px - 2px); } .wd-switch-rtl { direction: rtl; } .wd-switch-rtl .wd-switch-inner { margin: 0 27px 0 8px; } .wd-switch-rtl .wd-switch-handle { right: 4px; left: auto; } .wd-switch-rtl:not(.wd-switch-rtl-disabled):active .wd-switch-handle::before { right: 0; left: -30%; } .wd-switch-rtl:not(.wd-switch-rtl-disabled):active.wd-switch-checked .wd-switch-handle::before { right: -30%; left: 0; } .wd-switch-rtl.wd-switch-checked .wd-switch-inner { margin: 0 8px 0 27px; } .wd-switch-rtl.wd-switch-checked .wd-switch-handle { right: calc(100% - 16px - 4px); } .wd-switch-rtl.wd-switch-small.wd-switch-checked .wd-switch-handle { right: calc(100% - 12px - 2px); }