mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-01 02:37:46 +08:00
feat(style): add scrollbar for docs (#4800)
* feat(style): add scrollbar for docs * fix(style): adjust scrollbar color
This commit is contained in:
parent
324edcda96
commit
7caa13e80c
@ -71,7 +71,7 @@ const onNavClick = (item: Link) => {
|
||||
vertical-align: unset;
|
||||
}
|
||||
|
||||
.badge::v-deep .is-dot {
|
||||
.badge:deep(.is-dot) {
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
@use './base';
|
||||
@use './code';
|
||||
@use './navbar';
|
||||
@use './scrollbar';
|
||||
@use './subnav';
|
||||
@use './overlay';
|
||||
@use './sidebar';
|
||||
|
25
docs/.vitepress/vitepress/styles/scrollbar.scss
Normal file
25
docs/.vitepress/vitepress/styles/scrollbar.scss
Normal file
@ -0,0 +1,25 @@
|
||||
// scrollbar
|
||||
* {
|
||||
scrollbar-color: var(--el-scrollbar-bg-color) var(--el-bg-color);
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
}
|
||||
::-webkit-scrollbar:horizontal {
|
||||
height: 6px;
|
||||
}
|
||||
::-webkit-scrollbar-track {
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: rgba(0, 0, 0, 0.2);
|
||||
border-radius: 10px;
|
||||
transition: all 0.2s ease-in-out;
|
||||
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
}
|
@ -96,9 +96,9 @@ scrollbar/manual-scroll
|
||||
|
||||
## Scrollbar Events
|
||||
|
||||
| Event Name | Description | Parameters |
|
||||
| ---------- | ----------------------- | ----------------------------------------------- |
|
||||
| scroll | triggers when scrolling | distance of scrolling { scrollLeft, scrollTop } |
|
||||
| Event Name | Description | Parameters |
|
||||
| ---------- | ----------------------- | ------------------------------------------------- |
|
||||
| scroll | triggers when scrolling | distance of scrolling `{ scrollLeft, scrollTop }` |
|
||||
|
||||
## Scrollbar Methods
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user