UNPKG

antd

Version:

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

379 lines (378 loc) 11.2 kB
.ant-tree-checkbox { white-space: nowrap; cursor: pointer; outline: none; display: inline-block; line-height: 1; position: relative; vertical-align: middle; } .ant-tree-checkbox:hover .ant-tree-checkbox-inner, .ant-tree-checkbox-focused .ant-tree-checkbox-inner { border-color: #bcbcbc; } .ant-tree-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-tree-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-tree-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-tree-checkbox-indeterminate .ant-tree-checkbox-inner { border-color: #2db7f5; background-color: #2db7f5; } .ant-tree-checkbox-indeterminate .ant-tree-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-tree-checkbox-indeterminate:hover .ant-tree-checkbox-inner { border-color: #2db7f5; } .ant-tree-checkbox-checked:hover .ant-tree-checkbox-inner { border-color: #2db7f5; } .ant-tree-checkbox-checked .ant-tree-checkbox-inner { border-color: #2db7f5; background-color: #2db7f5; } .ant-tree-checkbox-checked .ant-tree-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-tree-checkbox-disabled.ant-tree-checkbox-checked:hover .ant-tree-checkbox-inner { border-color: #d9d9d9; } .ant-tree-checkbox-disabled.ant-tree-checkbox-checked .ant-tree-checkbox-inner { background-color: #f3f3f3; border-color: #d9d9d9; } .ant-tree-checkbox-disabled.ant-tree-checkbox-checked .ant-tree-checkbox-inner:after { -webkit-animation-name: none; animation-name: none; border-color: #ccc; } .ant-tree-checkbox-disabled:hover .ant-tree-checkbox-inner { border-color: #d9d9d9; } .ant-tree-checkbox-disabled .ant-tree-checkbox-inner { border-color: #d9d9d9; background-color: #f3f3f3; } .ant-tree-checkbox-disabled .ant-tree-checkbox-inner:after { -webkit-animation-name: none; animation-name: none; border-color: #f3f3f3; } .ant-tree-checkbox-disabled .ant-tree-checkbox-inner-input { cursor: default; } .ant-tree-checkbox-disabled + span { color: #ccc; cursor: not-allowed; } .ant-tree-checkbox-wrapper { cursor: pointer; font-size: 12px; display: inline-block; } .ant-tree-checkbox-wrapper + .ant-tree-checkbox-wrapper { margin-left: 8px; } .ant-tree-checkbox-wrapper + span, .ant-tree-checkbox + span { margin-left: 8px; margin-right: 8px; } .ant-tree-checkbox-group { font-size: 12px; } .ant-tree-checkbox-group-item { display: inline-block; } @media \0screen { .ant-tree-checkbox-checked .ant-tree-checkbox-inner:before, .ant-tree-checkbox-checked .ant-tree-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; } } .ant-tree { margin: 0; padding: 5px; font-size: 12px; } .ant-tree li { padding: 0; margin: 7px 0; list-style: none; white-space: nowrap; outline: 0; } .ant-tree li a[draggable], .ant-tree li a[draggable="true"] { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; /* Required to make elements draggable in old WebKit */ -khtml-user-drag: element; -webkit-user-drag: element; } .ant-tree li.drag-over > a[draggable] { background-color: #2db7f5; color: white; opacity: 0.8; } .ant-tree li.drag-over-gap-top > a[draggable] { border-top: 2px #2db7f5 solid; } .ant-tree li.drag-over-gap-bottom > a[draggable] { border-bottom: 2px #2db7f5 solid; } .ant-tree li.filter-node > a { color: #f50 !important; font-weight: bold!important; } .ant-tree li ul { margin: 0; padding: 0 0 0 18px; } .ant-tree li a { display: inline-block; padding: 1px 5px; border-radius: 2px; margin: 0; cursor: pointer; text-decoration: none; vertical-align: top; color: #666; -webkit-transition: all 0.3s ease; transition: all 0.3s ease; } .ant-tree li a:hover { background-color: #eaf8fe; } .ant-tree li a.ant-tree-node-selected { background-color: #d5f1fd; } .ant-tree li span.ant-tree-checkbox { margin: 2px 4px 0 0; } .ant-tree li span.ant-tree-switcher, .ant-tree li span.ant-tree-iconEle { margin: 0; width: 16px; height: 16px; line-height: 16px; display: inline-block; vertical-align: middle; border: 0 none; cursor: pointer; outline: none; } .ant-tree li span.ant-tree-icon_loading:after { display: inline-block; font-family: 'anticon'; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; content: "\e6a1"; -webkit-animation: loadingCircle 1s infinite linear; animation: loadingCircle 1s infinite linear; color: #2db7f5; } .ant-tree li span.ant-tree-switcher.ant-tree-switcher-noop { cursor: auto; } .ant-tree li span.ant-tree-switcher.ant-tree-roots_open, .ant-tree li span.ant-tree-switcher.ant-tree-center_open, .ant-tree li span.ant-tree-switcher.ant-tree-bottom_open, .ant-tree li span.ant-tree-switcher.ant-tree-noline_open { position: relative; } .ant-tree li span.ant-tree-switcher.ant-tree-roots_open:after, .ant-tree li span.ant-tree-switcher.ant-tree-center_open:after, .ant-tree li span.ant-tree-switcher.ant-tree-bottom_open:after, .ant-tree li span.ant-tree-switcher.ant-tree-noline_open:after { font-size: 12px; font-size: 6px \9; -webkit-transform: scale(0.5) rotate(0deg); -ms-transform: scale(0.5) rotate(0deg); transform: scale(0.5) rotate(0deg); /* IE6-IE8 */ -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', M11=1, M12=0, M21=0, M22=1)"; zoom: 1; display: inline-block; font-family: 'anticon'; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; content: "\e606"; font-weight: bold; position: absolute; top: 0; right: 4px; color: #666; -webkit-transition: -webkit-transform .3s ease; transition: -webkit-transform .3s ease; transition: transform .3s ease; transition: transform .3s ease, -webkit-transform .3s ease; } :root .ant-tree li span.ant-tree-switcher.ant-tree-roots_open:after, :root .ant-tree li span.ant-tree-switcher.ant-tree-center_open:after, :root .ant-tree li span.ant-tree-switcher.ant-tree-bottom_open:after, :root .ant-tree li span.ant-tree-switcher.ant-tree-noline_open:after { -webkit-filter: none; filter: none; } :root .ant-tree li span.ant-tree-switcher.ant-tree-roots_open:after, :root .ant-tree li span.ant-tree-switcher.ant-tree-center_open:after, :root .ant-tree li span.ant-tree-switcher.ant-tree-bottom_open:after, :root .ant-tree li span.ant-tree-switcher.ant-tree-noline_open:after { font-size: 12px; } .ant-tree li span.ant-tree-switcher.ant-tree-roots_close, .ant-tree li span.ant-tree-switcher.ant-tree-center_close, .ant-tree li span.ant-tree-switcher.ant-tree-bottom_close, .ant-tree li span.ant-tree-switcher.ant-tree-noline_close { position: relative; -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)"; } .ant-tree li span.ant-tree-switcher.ant-tree-roots_close:after, .ant-tree li span.ant-tree-switcher.ant-tree-center_close:after, .ant-tree li span.ant-tree-switcher.ant-tree-bottom_close:after, .ant-tree li span.ant-tree-switcher.ant-tree-noline_close:after { font-size: 12px; font-size: 6px \9; -webkit-transform: scale(0.5) rotate(0deg); -ms-transform: scale(0.5) rotate(0deg); transform: scale(0.5) rotate(0deg); /* IE6-IE8 */ -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', M11=1, M12=0, M21=0, M22=1)"; zoom: 1; display: inline-block; font-family: 'anticon'; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; content: "\e606"; font-weight: bold; position: absolute; top: 0; right: 4px; color: #666; -webkit-transition: -webkit-transform .3s ease; transition: -webkit-transform .3s ease; transition: transform .3s ease; transition: transform .3s ease, -webkit-transform .3s ease; } :root .ant-tree li span.ant-tree-switcher.ant-tree-roots_close:after, :root .ant-tree li span.ant-tree-switcher.ant-tree-center_close:after, :root .ant-tree li span.ant-tree-switcher.ant-tree-bottom_close:after, :root .ant-tree li span.ant-tree-switcher.ant-tree-noline_close:after { -webkit-filter: none; filter: none; } :root .ant-tree li span.ant-tree-switcher.ant-tree-roots_close:after, :root .ant-tree li span.ant-tree-switcher.ant-tree-center_close:after, :root .ant-tree li span.ant-tree-switcher.ant-tree-bottom_close:after, :root .ant-tree li span.ant-tree-switcher.ant-tree-noline_close:after { font-size: 12px; } .ant-tree li span.ant-tree-switcher.ant-tree-roots_close:after, .ant-tree li span.ant-tree-switcher.ant-tree-center_close:after, .ant-tree li span.ant-tree-switcher.ant-tree-bottom_close:after, .ant-tree li span.ant-tree-switcher.ant-tree-noline_close:after { -webkit-transform: rotate(270deg) scale(0.5); -ms-transform: rotate(270deg) scale(0.5); transform: rotate(270deg) scale(0.5); } .ant-tree-child-tree { display: none; } .ant-tree-child-tree-open { display: block; } .ant-tree-treenode-disabled > span, .ant-tree-treenode-disabled > a, .ant-tree-treenode-disabled > a span { color: #ccc; cursor: not-allowed; } .ant-tree-icon__open { margin-right: 2px; vertical-align: top; } .ant-tree-icon__close { margin-right: 2px; vertical-align: top; }