UNPKG

@ohu-mobile/core

Version:
195 lines 3.78 kB
.ohu-btn { height: 1.28rem; -webkit-user-select: none; -moz-user-select: none; user-select: none; cursor: pointer; -webkit-appearance: none; -webkit-tap-highlight-color: transparent; outline: none; white-space: nowrap; border: none; transition: all 0.3s; overflow: visible; padding-right: 0.74667rem; padding-left: 0.74667rem; color: #333; font-size: 0.42667rem; line-height: 1.28rem; border-radius: 3Px; font-weight: 400; background: #fff; position: relative; } .ohu-btn::after { content: ""; box-sizing: border-box; position: absolute; z-index: 1; pointer-events: none; top: 0; left: 0; width: 100%; height: 100%; border: 1Px solid #ccc; border-radius: 6Px; } @media only screen and (-webkit-min-device-pixel-ratio: 2) { .ohu-btn::after { width: 200%; height: 200%; transform: scale(0.5); transform-origin: 0 0; } } .ohu-btn > span { display: inline-block; vertical-align: top; } .ohu-btn > i { display: inline-block; font-size: 1.2em; pointer-events: none; } .ohu-btn > i + span { margin-left: 0.21333rem; } .ohu-btn.is-block { width: 100%; display: block; } .ohu-btn.is-inline { display: inline-block; } .ohu-btn.is-round { border-radius: 1.28rem; } .ohu-btn.is-round::after { border-radius: 1.28rem; } .ohu-btn.is-primary { background: #2d7eff; color: #fff; } .ohu-btn.is-primary:active { background: #2773E3; } .ohu-btn.is-primary:active::after { border-color: #2773E3; } .ohu-btn.is-primary::after { border-color: #2d7eff; } .ohu-btn.is-translucent { background: rgba(45, 126, 255, 0.15); color: #2d7eff; } .ohu-btn.is-translucent:active { color: #73ABFF; background: #C1DBFF; } .ohu-btn.is-translucent:active::after { border-color: #C1DBFF; } .ohu-btn.is-translucent::after { border-color: rgba(45, 126, 255, 0.15); } .ohu-btn.is-plain.is-primary { background: transparent; color: #2d7eff; } .ohu-btn.is-plain.is-primary:active { background: transparent; color: #73ABFF; } .ohu-btn.is-plain.is-primary:active::after { border-color: #73ABFF; } .ohu-btn.is-plain[disabled] { color: #333; } .ohu-btn.is-plain[disabled]::after { border-color: #CCC; } .ohu-btn.is-link { background: transparent; } .ohu-btn.is-link::after { border: none; } .ohu-btn.is-link.is-default { color: #999; } .ohu-btn.is-link.is-primary { color: #2d7eff; } .ohu-btn.is-link:active { background: #F5F5F5; color: #2773E3; } .ohu-btn.is-sm { height: 0.85333rem; line-height: 0.85333rem; font-size: 0.37333rem; padding-right: 0.21333rem; padding-left: 0.21333rem; } .ohu-btn.is-sm.is-round { border-radius: 0.85333rem; padding-right: 0.32rem; padding-left: 0.32rem; } .ohu-btn.is-sm.is-round::after { border-radius: 0.85333rem; } .ohu-btn.is-md { height: 1.06667rem; line-height: 1.06667rem; font-size: 0.4rem; padding-right: 0.48rem; padding-left: 0.48rem; } .ohu-btn.is-md.is-round { border-radius: 1.06667rem; } .ohu-btn.is-md.is-round::after { border-radius: 1.06667rem; } .ohu-btn.is-icon-only.is-lg { padding: 0; width: 1.28rem; } .ohu-btn.is-icon-only.is-md { padding: 0; width: 1.06667rem; } .ohu-btn.is-icon-only.is-sm { padding: 0; width: 0.85333rem; } .ohu-btn:active { background: #F5F5F5; } .ohu-btn.is-loading { opacity: 0.5; } .ohu-btn.is-loading.is-translucent { background: rgba(47, 131, 255, 0.1); color: #fff; opacity: 1; } .ohu-btn.is-loading.is-translucent::after { border-color: rgba(47, 131, 255, 0.1); } .ohu-btn[disabled] { cursor: not-allowed; opacity: 0.5; } .ohu-btn[disabled].is-translucent { background: rgba(47, 131, 255, 0.1); color: #fff; opacity: 1; } .ohu-btn[disabled].is-translucent::after { border-color: rgba(47, 131, 255, 0.1); }