UNPKG

antd

Version:

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

168 lines (167 loc) 4.19 kB
.ant-checkbox { white-space: nowrap; cursor: pointer; outline: none; display: inline-block; line-height: 1; position: relative; vertical-align: middle; } .ant-checkbox:hover .ant-checkbox-inner, .ant-checkbox-focused .ant-checkbox-inner { border-color: #bcbcbc; } .ant-checkbox-inner { position: relative; top: 0; left: 0; display: inline-block; width: 14px; height: 14px; border-width: 1px; border-style: solid; border-radius: 3px; border-color: #d9d9d9; background-color: #fff; -webkit-transition: border-color 0.1s cubic-bezier(0.71, -0.46, 0.29, 1.46), background-color 0.1s cubic-bezier(0.71, -0.46, 0.29, 1.46); transition: border-color 0.1s cubic-bezier(0.71, -0.46, 0.29, 1.46), background-color 0.1s cubic-bezier(0.71, -0.46, 0.29, 1.46); } .ant-checkbox-inner:after { -webkit-transform: rotate(45deg) scale(0); -ms-transform: rotate(45deg) scale(0); transform: rotate(45deg) scale(0); position: absolute; left: 4px; top: 1px; display: table; width: 5px; height: 8px; border: 2px solid #fff; border-top: 0; border-left: 0; content: ' '; -webkit-transition: all 0.1s cubic-bezier(0.71, -0.46, 0.88, 0.6); transition: all 0.1s cubic-bezier(0.71, -0.46, 0.88, 0.6); } .ant-checkbox-input { position: absolute; left: 0; z-index: 1; cursor: pointer; opacity: 0; filter: alpha(opacity=0); top: 0; bottom: 0; right: 0; width: 100%; height: 100%; } .ant-checkbox-indeterminate .ant-checkbox-inner { border-color: #2db7f5; background-color: #2db7f5; } .ant-checkbox-indeterminate .ant-checkbox-inner:after { content: ' '; -webkit-transform: scale(1); -ms-transform: scale(1); transform: scale(1); position: absolute; left: 2px; top: 5px; width: 8px; height: 1px; } .ant-checkbox-indeterminate:hover .ant-checkbox-inner { border-color: #2db7f5; } .ant-checkbox-checked:hover .ant-checkbox-inner { border-color: #2db7f5; } .ant-checkbox-checked .ant-checkbox-inner { border-color: #2db7f5; background-color: #2db7f5; } .ant-checkbox-checked .ant-checkbox-inner:after { -webkit-transform: rotate(45deg) scale(1); -ms-transform: rotate(45deg) scale(1); transform: rotate(45deg) scale(1); position: absolute; left: 4px; top: 1px; display: table; width: 5px; height: 8px; border: 2px solid #fff; border-top: 0; border-left: 0; content: ' '; -webkit-transition: all 0.2s cubic-bezier(0.12, 0.4, 0.29, 1.46) 0.1s; transition: all 0.2s cubic-bezier(0.12, 0.4, 0.29, 1.46) 0.1s; } .ant-checkbox-disabled.ant-checkbox-checked:hover .ant-checkbox-inner { border-color: #d9d9d9; } .ant-checkbox-disabled.ant-checkbox-checked .ant-checkbox-inner { background-color: #f3f3f3; border-color: #d9d9d9; } .ant-checkbox-disabled.ant-checkbox-checked .ant-checkbox-inner:after { -webkit-animation-name: none; animation-name: none; border-color: #ccc; } .ant-checkbox-disabled:hover .ant-checkbox-inner { border-color: #d9d9d9; } .ant-checkbox-disabled .ant-checkbox-inner { border-color: #d9d9d9; background-color: #f3f3f3; } .ant-checkbox-disabled .ant-checkbox-inner:after { -webkit-animation-name: none; animation-name: none; border-color: #f3f3f3; } .ant-checkbox-disabled .ant-checkbox-inner-input { cursor: default; } .ant-checkbox-disabled + span { color: #ccc; cursor: not-allowed; } .ant-checkbox-wrapper { cursor: pointer; font-size: 12px; display: inline-block; } .ant-checkbox-wrapper + .ant-checkbox-wrapper { margin-left: 8px; } .ant-checkbox-wrapper + span, .ant-checkbox + span { margin-left: 8px; margin-right: 8px; } .ant-checkbox-group { font-size: 12px; } .ant-checkbox-group-item { display: inline-block; } @media \0screen { .ant-checkbox-checked .ant-checkbox-inner:before, .ant-checkbox-checked .ant-checkbox-inner:after { font-family: 'anticon'; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; content: "\e632"; font-weight: bold; font-size: 8px; border: 0; color: #fff; left: 2px; top: 3px; position: absolute; } }