UNPKG

rsuite-theme

Version:
257 lines (223 loc) 5.62 kB
@charset "utf-8"; //Created by yangguo on 2016/7/4 0004. /* General settings */ div.checker, div.radio { display: -moz-inline-box; display: inline-block; *display: inline; zoom: 1; vertical-align: middle; &, & * { margin: 0; padding: 0; line-height: 1; vertical-align: middle; } &:focus { outline: 0; } & .checkbox-wrapper, & .radio-wrapper { & { margin-right: 5px; } &, &:before, &:after { text-align: center; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; } &:after { .opacity(0); transform: scale(0); transition: all .3s linear, transform .2s cubic-bezier(0, 0, 0.2, 1); } &.checked { &:after { .opacity(1); } } } &.disabled { & .checkbox-wrapper.checked, & .radio-wrapper.checked { &:after { border-color: darken(@btn-default-bg, 17%); } } } &.active .checkbox-wrapper, &.active .radio-wrapper { &:before { border-color: darken(@btn-default-border, 10%); } &.checked { border-color: darken(@btn-default-border, 10%); } } &.hover, &.focus { & .checkbox-wrapper, & .radio-wrapper { &:before { border-color: darken(@btn-default-border, 5%); } &.checked { border-color: darken(@btn-default-border, 5%); } } } &.disabled { &, &.active { & .checkbox-wrapper, & .radio-wrapper { background-color: @btn-default-bg; &.checked { background-color: @btn-default-bg; &:before { border-color: darken(@btn-default-border, 17%); } } } } } } /* Remove default webkit and possible mozilla .search styles. * Keeping this as :active to remove browser styles */ div.checker input, input[type="search"], input[type="search"]:active { -moz-appearance: none; -webkit-appearance: none; } /* Checkbox */ div.checker { position: relative; margin-right: 5px; & .checkbox-wrapper, & input { width: @base-unit-px; height: @base-unit-px; } & input { opacity: 0; filter: alpha(opacity=0); -moz-opacity: 0; border: none; background: none; display: -moz-inline-box; display: inline-block; *display: inline; zoom: 1; position: absolute; top: 0; left: 0; } & .checkbox-wrapper { display: -moz-inline-box; display: inline-block; *display: inline; zoom: 1; text-align: center; position: relative; background-color: white; &:before, &:after { content: " "; position: absolute; width: @base-unit-px; height: @base-unit-px; line-height: @base-unit-px; top: 0; left: 0; } &:before { display: block; border: 1px solid @border-base-color; } &:after { border: solid @text-primary-color; border-width: 0 3px 3px 0; width: 8px; height: 12px; transform: scale(0) rotate(@check-check-rotate); transform-origin: center center; margin-top: 2px; margin-left: 5px; } &.checked:after { transform: scale(1) rotate(@check-check-rotate); } } } /* Radio */ div.radio { position: relative; margin-right: 3px; background-image: none; & .radio-wrapper, & input { width: @base-unit-px; height: @base-unit-px; } & .radio-wrapper { display: -moz-inline-box; display: inline-block; *display: inline; zoom: 1; text-align: center; position: relative; border-radius: (@base-unit-px/2); &:before, &:after { content: " "; position: absolute; width: @base-unit-px; height: @base-unit-px; line-height: @base-unit-px; } &:before { display: block; border: 1px solid #ddd; border-radius: 9px; top: 0; left: 0; } &:after { width: @radio-check-width; height: @radio-check-width; border-radius: (@radio-check-width/2); margin: auto; top: 0; left: 0; right: 0; bottom: 0; } &.checked { &:after { background-color: @text-primary-color; transform: scale(1); } } } & input { opacity: 0; filter: alpha(opacity=0); -moz-opacity: 0; border: none; background: none; display: -moz-inline-box; display: inline-block; *display: inline; zoom: 1; text-align: center; } &.disabled { &, &.active { & .radio-wrapper { &:after { background-color: darken(@btn-default-bg, 17%);; } } } } }