UNPKG

gov-design-vue

Version:

An enterprise-class UI design language and Vue-based implementation

165 lines (164 loc) 3.79 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 */ .gov-switch { font-family: "Chinese Quote", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 14px; font-variant: tabular-nums; line-height: 1.5; color: rgba(0, 0, 0, 0.65); margin: 0; padding: 0; list-style: none; position: relative; display: inline-block; box-sizing: border-box; height: 22px; min-width: 44px; line-height: 20px; vertical-align: middle; border-radius: 100px; border: 1px solid transparent; background-color: rgba(0, 0, 0, 0.25); cursor: pointer; transition: all 0.36s; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } .gov-switch-inner { color: #fff; font-size: 12px; margin-left: 24px; margin-right: 6px; display: block; } .gov-switch-loading-icon, .gov-switch:after { position: absolute; width: 18px; height: 18px; left: 1px; top: 1px; border-radius: 18px; background-color: #fff; content: ' '; cursor: pointer; transition: all 0.36s cubic-bezier(0.78, 0.14, 0.15, 0.86); } .gov-switch:after { box-shadow: 0 2px 4px 0 rgba(0, 35, 11, 0.2); } .gov-switch:active:before, .gov-switch:active:after { width: 24px; } .gov-switch-loading-icon { background: transparent; z-index: 1; display: none; font-size: 12px; } .gov-switch-loading-icon svg { position: absolute; left: 0; top: 0; right: 0; bottom: 0; margin: auto; } .gov-switch-loading .gov-switch-loading-icon { display: inline-block; color: rgba(0, 0, 0, 0.65); } .gov-switch-checked.gov-switch-loading .gov-switch-loading-icon { color: #0066ff; } .gov-switch:focus { box-shadow: 0 0 0 2px rgba(0, 102, 255, 0.2); outline: 0; } .gov-switch:focus:hover { box-shadow: none; } .gov-switch-small { height: 16px; min-width: 28px; line-height: 14px; } .gov-switch-small .gov-switch-inner { margin-left: 18px; margin-right: 3px; font-size: 12px; } .gov-switch-small:after { width: 12px; height: 12px; } .gov-switch-small:active:before, .gov-switch-small:active:after { width: 16px; } .gov-switch-small .gov-switch-loading-icon { width: 12px; height: 12px; } .gov-switch-small.gov-switch-checked .gov-switch-inner { margin-left: 3px; margin-right: 18px; } .gov-switch-small.gov-switch-checked .gov-switch-loading-icon { left: 100%; margin-left: -13px; } .gov-switch-small.gov-switch-loading .gov-switch-loading-icon { transform: scale(0.66667); font-weight: bold; } .gov-switch-checked { background-color: #0066ff; } .gov-switch-checked .gov-switch-inner { margin-left: 6px; margin-right: 24px; } .gov-switch-checked:after { left: 100%; transform: translateX(-100%); margin-left: -1px; } .gov-switch-checked .gov-switch-loading-icon { left: 100%; margin-left: -19px; } .gov-switch-loading, .gov-switch-disabled { cursor: not-allowed; opacity: 0.4; } .gov-switch-loading *, .gov-switch-disabled * { cursor: not-allowed; } @-webkit-keyframes AntSwitchSmallLoadingCircle { 0% { transform-origin: 50% 50%; transform: rotate(0deg) scale(0.66667); } 100% { transform-origin: 50% 50%; transform: rotate(360deg) scale(0.66667); } } @keyframes AntSwitchSmallLoadingCircle { 0% { transform-origin: 50% 50%; transform: rotate(0deg) scale(0.66667); } 100% { transform-origin: 50% 50%; transform: rotate(360deg) scale(0.66667); } }