refactor code style

This commit is contained in:
afc163 2017-09-21 14:16:01 +08:00
parent 39993fc749
commit afce275d25

View File

@ -1,57 +1,50 @@
@import "../../style/themes/default"; @import "../../style/themes/default";
.@{ant-prefix} { .@{ant-prefix}-anchor {
&-anchor { position: relative;
position: relative; &-wrapper {
&-wrapper { background-color: @component-background;
background-color: @component-background; }
}
&-ink { &-ink {
position: absolute; position: absolute;
height: 100%;
left: 0;
top: 0;
&:before {
content: ' ';
position: relative;
width: 2px;
height: 100%; height: 100%;
left: 0; display: block;
top: 0; background-color: @border-color-split;
&:before { margin: 0 auto;
content: ' ';
position: relative;
width: 2px;
height: 100%;
display: block;
background-color: @border-color-split;
margin: 0 auto;
}
&-ball {
display: none;
position: absolute;
width: 9px;
height: 9px;
border-radius: 9px;
border: 3px solid @primary-color;
background-color: @component-background;
left: 50%;
transition: top .3s ease-in-out;
transform: translateX(-50%);
&.visible {
display: inline-block;
}
}
} }
&-ball {
&.fixed &-ink &-ink-ball {
display: none; display: none;
position: absolute;
width: 9px;
height: 9px;
border-radius: 9px;
border: 3px solid @primary-color;
background-color: @component-background;
left: 50%;
transition: top .3s ease-in-out;
transform: translateX(-50%);
&.visible {
display: inline-block;
}
} }
} }
&.fixed &-ink &-ink-ball {
display: none;
}
&-anchor-link { &-anchor-link {
padding: 8px 0 8px 18px; padding: 8px 0 8px 18px;
line-height: 1; line-height: 1;
& & {
padding-top: 6px;
padding-bottom: 6px;
}
&-title { &-title {
display: block; display: block;
position: relative; position: relative;
@ -61,18 +54,19 @@
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
margin-bottom: 8px; margin-bottom: 8px;
}
&-title:only-child { &:only-child {
margin-bottom: 0; margin-bottom: 0;
}
} }
&-active > &-title { &-active > &-title {
color: @primary-color; color: @primary-color;
} }
}
& > & { &-anchor-link &-anchor-link {
font-size: @font-size-base; padding-top: 6px;
} padding-bottom: 6px;
} }
} }