Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/indexes-anchor/indexes-anchor.less
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
@indexes-anchor-font-size: var(--td-indexes-anchor-font-size, 28rpx);
@indexes-anchor-line-height: var(--td-indexes-anchor-line-height, 44rpx);
@indexes-anchor-active-font-weight: var(--td-indexes-anchor-active-font-weight, 600);
@indexes-anchor-offset-top: var(--td-indexes-anchor-top, 0); // 锚点吸顶时与顶部的距离
@indexes-anchor-padding: var(--td-indexes-anchor-padding, 8rpx 32rpx);
@indexes-anchor-border-color: var(--td-indexes-anchor-border-color, @component-border);

.@{prefix}-indexes-anchor {
color: @indexes-anchor-color;
Expand All @@ -15,12 +18,13 @@

&__header {
display: none;
padding: 8rpx 32rpx;
padding: @indexes-anchor-padding;
background-color: @indexes-anchor-bg-color;

&--active {
background-color: @indexes-anchor-active-bg-color;
.border(bottom);

.border(bottom, @indexes-anchor-border-color);
}
}

Expand All @@ -37,7 +41,7 @@

&--sticky {
position: fixed;
top: 0;
top: @indexes-anchor-offset-top;
left: 0;
width: 100%;
z-index: 1;
Expand Down
11 changes: 7 additions & 4 deletions src/indexes/README.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ The component provides the following CSS variables, which can be used to customi
Name | Default Value | Description
-- | -- | --
--td-indexes-sidebar-active-bg-color | @brand-color | -
--td-indexes-sidebar-active-color | @font-white-1 | -
--td-indexes-sidebar-color | @font-gray-1 | -
--td-indexes-sidebar-active-color | @text-color-anti | -
--td-indexes-sidebar-color | @text-color-primary | -
--td-indexes-sidebar-font-size | 24rpx | -
--td-indexes-sidebar-item-size | 40rpx | -
--td-indexes-sidebar-line-height | 40rpx | -
Expand All @@ -57,6 +57,9 @@ Name | Default Value | Description
--td-indexes-anchor-active-color | @brand-color | -
--td-indexes-anchor-active-font-weight | 600 | -
--td-indexes-anchor-bg-color | @bg-color-secondarycontainer | -
--td-indexes-anchor-color | @font-gray-1 | -
--td-indexes-anchor-border-color | @component-border | -
--td-indexes-anchor-color | @text-color-primary | -
--td-indexes-anchor-font-size | 28rpx | -
--td-indexes-anchor-line-height | 44rpx | -
--td-indexes-anchor-line-height | 44rpx | -
--td-indexes-anchor-padding | 8rpx 32rpx | -
--td-indexes-anchor-top | 0 | -
11 changes: 7 additions & 4 deletions src/indexes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ t-class-sidebar-item | 侧边栏选项样式类
名称 | 默认值 | 描述
-- | -- | --
--td-indexes-sidebar-active-bg-color | @brand-color | -
--td-indexes-sidebar-active-color | @font-white-1 | -
--td-indexes-sidebar-color | @font-gray-1 | -
--td-indexes-sidebar-active-color | @text-color-anti | -
--td-indexes-sidebar-color | @text-color-primary | -
--td-indexes-sidebar-font-size | 24rpx | -
--td-indexes-sidebar-item-size | 40rpx | -
--td-indexes-sidebar-line-height | 40rpx | -
Expand All @@ -100,6 +100,9 @@ t-class-sidebar-item | 侧边栏选项样式类
--td-indexes-anchor-active-color | @brand-color | -
--td-indexes-anchor-active-font-weight | 600 | -
--td-indexes-anchor-bg-color | @bg-color-secondarycontainer | -
--td-indexes-anchor-color | @font-gray-1 | -
--td-indexes-anchor-border-color | @component-border | -
--td-indexes-anchor-color | @text-color-primary | -
--td-indexes-anchor-font-size | 28rpx | -
--td-indexes-anchor-line-height | 44rpx | -
--td-indexes-anchor-line-height | 44rpx | -
--td-indexes-anchor-padding | 8rpx 32rpx | -
--td-indexes-anchor-top | 0 | -
Loading