naive-ui/styles/Anchor.scss

80 lines
2.0 KiB
SCSS
Raw Normal View History

@import './mixins/mixins.scss';
@import './themes/vars.scss';
2019-10-12 23:22:52 +08:00
@include themes-mixin {
@include b(anchor) {
padding-left: 4px;
position: relative;
@include b(anchor-slot) {
position: absolute;
left: 2px;
width: 100%;
max-width: 0;
transition: top .15s $default-cubic-bezier, max-width .15s $default-cubic-bezier;
background-color: change-color($color: $--primary-6, $alpha: .2);
border-top-right-radius: 10.5px;
border-bottom-right-radius: 10.5px;
}
@include b(anchor-rail) {
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 4px;
border-radius: 2px;
transition: background-color .3s $default-cubic-bezier;
background-color: $--anchor-rail-background-color;
2019-10-12 23:22:52 +08:00
overflow: hidden;
@include e(bar) {
position: absolute;
left: 0;
transition: top .15s $default-cubic-bezier, background-color .3s $default-cubic-bezier;
2019-10-12 23:22:52 +08:00
width: 4px;
2019-10-13 21:13:32 +08:00
height: 21px;
background-color: transparent;
@include m(active) {
background-color: $--primary-6;
}
2019-10-12 23:22:52 +08:00
}
& + {
@include b(anchor-link) {
margin-top: 0;
}
}
}
@include b(anchor-link) {
margin-top: 10px;
padding-left: 24px;
position: relative;
2019-10-14 17:49:23 +08:00
height: 21px;
line-height: 21px;
2019-10-12 23:22:52 +08:00
@include e(title) {
2019-10-17 14:03:09 +08:00
outline: none;
2019-10-14 17:49:23 +08:00
max-width: 100%;
text-decoration: none;
2019-10-14 17:49:23 +08:00
white-space: nowrap;
2019-10-12 23:22:52 +08:00
line-height: 21px;
2019-10-14 17:49:23 +08:00
text-overflow: ellipsis;
overflow: hidden;
2019-10-12 23:22:52 +08:00
cursor: pointer;
display: inline-block;
font-size: 14px;
padding-right: 16px;
color: $--n-text-color;
transition: color .3s $default-cubic-bezier;
2019-10-17 14:03:09 +08:00
&:hover, &:focus {
2019-10-12 23:22:52 +08:00
color: $--n-primary-color;
}
@include m(active) {
color: $--n-primary-color;
}
2019-10-12 23:22:52 +08:00
}
}
& > {
@include b(anchor-link) {
padding-left: 16px;
}
}
}
}