UNPKG

atui

Version:

components built with Vue.js

197 lines (169 loc) 3.67 kB
// Form // -------------------------------------------------- // created by ruohuan @prefix-cls-form: e("@{prefix-cls}-form"); input[type="checkbox"], input[type="radio"] { appearance: none; position: relative; top: -1px; zoom: 1; outline: none; } input[type="checkbox"] { position: relative; width: 14px; height: 14px; vertical-align: middle; background-color: #fff; border: 1px solid #d9d9d9; border-radius: 2px; box-shadow: none; outline: none; &:checked { // background-color: @checkbox-bg; // border-color: @checkbox-bg; &:after { position: absolute; left: 0; top: 2px; line-height: 10px; background-color: transparent; content: '\00ac'; font-family: arial; // color: #fff; color: @checkbox-bg; font-size: 12px; font-weight: bolder; border-radius: 2px; text-align: center; transform: rotate(135deg) translateX(-50%); } } &[disabled], &[disabled]:checked { background-color: #f2f2f2; border-color: #e6e6e6; color: #ccc; cursor: not-allowed; &:after { background-color: #f2f2f2; color: #ccc; } } } // ie11以下不支持appearance,故要还原成默认样式 .let-ie11 input[type="checkbox"], .let-ie11 input[type="radio"] { width: auto; height: auto; padding: 0; border: 0; } input[type="radio"] { position: relative; width: 14px; height: 14px; vertical-align: middle; background-color: #fff; border: 1px solid #d9d9d9; border-radius: 7px; box-shadow: none; outline: none; &:checked { border-color: @radio-bg; &:after { content: ''; position: absolute; left: 3px; top: 3px; width: 6px; height: 6px; background-color: @radio-bg; border-radius: 3px; } } &[disabled] { background-color: #f2f2f2; border-color: #e6e6e6; cursor: not-allowed; &:checked { border-color: #e6e6e6; &:after { background-color: #ccc; } } } } .@{prefix-cls-form} { font-size: 12px; .@{prefix-cls-form}-item { .clearfix(); margin-bottom: 20px; color: #666; // &.@{prefix-cls-form}-with-help { // margin-bottom: 0; // } &.@{prefix-cls-form}-popup { margin-bottom: 20px; } } .@{prefix-cls-form}-status-icon { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); } .@{prefix-cls-form}-has-success { .@{prefix-cls-form}-status-icon, .@{prefix-cls-form}-status-info { color: #1dbf38; } } .@{prefix-cls-form}-has-error { .@{prefix-cls-form}-status-icon, .@{prefix-cls-form}-status-info { color: #ff5959; } } .@{prefix-cls-form}-required-icon { position: relative; top: 1px; padding: 0 1px; color: #ff7500; } .@{prefix-cls-form}-label { display: block; width: 100%; padding: 7px 0; color: #666; text-align: right; vertical-align: middle; } .@{prefix-cls-form}-input { position: relative; padding-right: 30px; & > label { display: inline-block; padding: 7px; input[type="radio"], input[type="checkbox"] { margin-right: 10px; } } } .@{prefix-cls-form}-status-info { line-height: 20px; position: absolute; top: 100%; } } .@{prefix-cls-form}-valid-popup-container { position: relative; zoom: 1; .@{prefix-cls-form}-valid-popup-message { position: absolute; top: 0; left: 100%; max-width: 80%; min-width: 60%; } .@{prefix-cls}-message.@{prefix-cls}-message-arrow-left:before { top: 15px; } }