iview/src/styles/components/tree.less

139 lines
3.9 KiB
Text
Raw Normal View History

@tree-prefix-cls: ~"@{css-prefix}tree";
.@{tree-prefix-cls} {
2017-02-07 11:34:00 +08:00
margin: 0;
padding: 5px;
2017-02-07 13:34:16 +08:00
font-size: @font-size-small;
2017-02-07 11:34:00 +08:00
li {
padding: 0;
2017-02-07 15:01:46 +08:00
margin: 8px 0;
2017-02-07 11:34:00 +08:00
list-style: none;
white-space: nowrap;
outline: 0;
a[draggable],
a[draggable="true"] {
user-select: none;
/* Required to make elements draggable in old WebKit */
-khtml-user-drag: element;
-webkit-user-drag: element;
}
&.drag-over {
> a[draggable] {
background-color: @primary-color;
color: white;
opacity: 0.8;
}
}
&.drag-over-gap-top {
> a[draggable] {
border-top: 2px @primary-color solid;
}
}
&.drag-over-gap-bottom {
> a[draggable] {
border-bottom: 2px @primary-color solid;
}
}
&.filter-node {
> a {
color: @error-color!important;
font-weight: bold!important;
}
}
ul {
margin: 0;
padding: 0 0 0 18px;
}
a {
display: inline-block;
margin: 0;
2017-02-07 15:01:46 +08:00
padding: 0 4px;
2017-02-07 13:34:16 +08:00
border-radius: @btn-border-radius-small;
2017-02-07 11:34:00 +08:00
cursor: pointer;
text-decoration: none;
vertical-align: top;
2017-02-07 13:34:16 +08:00
color: @text-color;
transition: all @transition-time @ease-in-out;
2017-02-07 11:34:00 +08:00
&:hover {
background-color: tint(@primary-color, 90%);
}
&.@{tree-prefix-cls}-node-selected {
background-color: tint(@primary-color, 80%);
}
}
2017-02-07 15:29:53 +08:00
.@{checkbox-prefix-cls}-wrapper{
margin-right: 4px;
}
2017-02-07 11:34:00 +08:00
span {
&.@{tree-prefix-cls}-switcher,
&.@{tree-prefix-cls}-iconEle {
2017-02-07 13:34:16 +08:00
display: inline-block;
2017-02-07 15:01:46 +08:00
text-align: center;
2017-02-07 11:34:00 +08:00
width: 16px;
height: 16px;
line-height: 16px;
2017-02-07 13:34:16 +08:00
margin: 0;
2017-02-07 11:34:00 +08:00
vertical-align: middle;
border: 0 none;
cursor: pointer;
outline: none;
}
2017-02-07 13:34:16 +08:00
//&.@{tree-prefix-cls}-icon_loading {
// &:after {
// display: inline-block;
// //.iconfont-font("\e6a1");
// animation: loadingCircle 1s infinite linear;
// color: @primary-color;
// }
//}
2017-02-07 11:34:00 +08:00
&.@{tree-prefix-cls}-switcher {
2017-02-07 13:34:16 +08:00
i{
transition: all @transition-time @ease-in-out;
}
2017-02-07 11:34:00 +08:00
&.@{tree-prefix-cls}-switcher-noop {
2017-03-03 10:35:38 +08:00
//display: none;
2017-02-07 11:34:00 +08:00
cursor: auto;
2017-02-07 13:34:16 +08:00
i{
display: none;
}
2017-02-07 11:34:00 +08:00
}
&.@{tree-prefix-cls}-roots_open,
&.@{tree-prefix-cls}-center_open,
&.@{tree-prefix-cls}-bottom_open,
&.@{tree-prefix-cls}-noline_open {
2017-02-07 13:34:16 +08:00
i {
transform: rotate(90deg);
}
2017-02-07 11:34:00 +08:00
}
&.@{tree-prefix-cls}-roots_close,
&.@{tree-prefix-cls}-center_close,
&.@{tree-prefix-cls}-bottom_close,
&.@{tree-prefix-cls}-noline_close {
2017-02-07 13:34:16 +08:00
2017-02-07 11:34:00 +08:00
}
}
}
}
&-child-tree {
display: none;
&-open {
display: block;
}
}
&-treenode-disabled {
>span,
>a,
>a span {
2017-02-07 13:34:16 +08:00
color: @input-disabled-bg;
2017-02-07 11:34:00 +08:00
cursor: not-allowed;
}
}
&-icon__open {
margin-right: 2px;
vertical-align: top;
}
&-icon__close {
margin-right: 2px;
vertical-align: top;
}
}