naive-ui/styles/Anchor.scss

95 lines
2.5 KiB
SCSS
Raw Normal View History

@import './mixins/mixins.scss';
2019-10-12 23:22:52 +08:00
@include themes-mixin {
@include b(anchor) {
2019-12-06 15:25:45 +08:00
@include once {
padding-left: 4px;
position: relative;
}
@include b(anchor-link-background) {
@include once {
position: absolute;
left: 2px;
width: 100%;
max-width: 0;
2019-12-26 23:58:50 +08:00
transition: top .15s $--n-ease-in-out-cubic-bezier, max-width .15s $--n-ease-in-out-cubic-bezier, background-color .3s $--n-ease-in-out-cubic-bezier;
2019-12-06 15:25:45 +08:00
border-top-right-radius: 10.5px;
border-bottom-right-radius: 10.5px;
}
background-color: $--anchor-link-background-color;
2019-10-12 23:22:52 +08:00
}
@include b(anchor-rail) {
2019-12-06 15:25:45 +08:00
@include once {
2019-10-12 23:22:52 +08:00
position: absolute;
left: 0;
2019-12-06 15:25:45 +08:00
top: 0;
bottom: 0;
2019-10-12 23:22:52 +08:00
width: 4px;
2019-12-06 15:25:45 +08:00
border-radius: 2px;
transition: background-color .3s $--n-ease-in-out-cubic-bezier;
2019-12-06 15:25:45 +08:00
overflow: hidden;
}
background-color: $--anchor-rail-background-color;
@include e(bar) {
@include once {
position: absolute;
left: 0;
transition: top .15s $--n-ease-in-out-cubic-bezier, background-color .3s $--n-ease-in-out-cubic-bezier;
2019-12-06 15:25:45 +08:00
width: 4px;
height: 21px;
background-color: transparent;
}
2019-10-13 21:13:32 +08:00
@include m(active) {
background-color: $--primary-6;
}
2019-10-12 23:22:52 +08:00
}
2019-12-06 15:25:45 +08:00
@include once {
& + {
@include b(anchor-link) {
margin-top: 0;
}
2019-10-12 23:22:52 +08:00
}
}
}
@include b(anchor-link) {
2019-12-06 15:25:45 +08:00
@include once {
margin-top: 10px;
padding-left: 16px;
position: relative;
min-height: 21px;
2019-10-12 23:22:52 +08:00
line-height: 21px;
2019-12-06 15:25:45 +08:00
display: flex;
flex-direction: column;
& > {
2019-12-17 18:09:46 +08:00
@include b(anchor-link) {
2019-12-06 15:25:45 +08:00
padding-left: 16px;
}
}
}
@include e(title) {
@include once {
outline: none;
max-width: 100%;
text-decoration: none;
white-space: nowrap;
line-height: 21px;
text-overflow: ellipsis;
overflow: hidden;
cursor: pointer;
display: inline-block;
font-size: 14px;
padding-right: 16px;
transition: color .3s $--n-ease-in-out-cubic-bezier;
2019-12-06 15:25:45 +08:00
}
2019-12-17 18:09:46 +08:00
color: map-get($--anchor-link-title-text-color, 'default');
2019-10-17 14:03:09 +08:00
&:hover, &:focus {
2019-12-04 18:43:55 +08:00
color: map-get($--anchor-link-title-text-color, 'hover');
2019-10-12 23:22:52 +08:00
}
@include m(active) {
2019-12-04 18:43:55 +08:00
color: map-get($--anchor-link-title-text-color, 'active');
}
2019-10-12 23:22:52 +08:00
}
}
}
}