mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-11-17 14:28:25 +00:00
Add scroll padding
This commit is contained in:
@@ -60,7 +60,6 @@ const showHandles = ref(true);
|
||||
// motion-v passes the variant label that finished, not the resolved variant
|
||||
const onAnimationComplete = (variant: unknown) => {
|
||||
if (variant === 'visible') drawAnimation.value = 'exit';
|
||||
if (variant === 'exit') showHandles.value = false;
|
||||
};
|
||||
|
||||
// Only rendered on the client, so reduced motion is known before the first frame
|
||||
|
||||
@@ -179,6 +179,9 @@ function scrollTrack(direction: 1 | -1) {
|
||||
padding-right: 24px;
|
||||
scroll-padding-right: 24px;
|
||||
scrollbar-width: thin;
|
||||
scroll-snap-align: center;
|
||||
scroll-padding-left: 24px;
|
||||
scroll-padding-right: 24px;
|
||||
}
|
||||
|
||||
.track:focus-visible {
|
||||
@@ -202,16 +205,30 @@ function scrollTrack(direction: 1 | -1) {
|
||||
|
||||
.fade-left {
|
||||
left: 0;
|
||||
width: 96px;
|
||||
width: 48px;
|
||||
background: linear-gradient(to left, transparent, var(--vp-c-bg));
|
||||
}
|
||||
|
||||
.fade-right {
|
||||
right: 0;
|
||||
width: 160px;
|
||||
width: 48px;
|
||||
background: linear-gradient(to right, transparent, var(--vp-c-bg) 85%);
|
||||
}
|
||||
|
||||
@media (min-width: 640px) {
|
||||
.fade-left {
|
||||
width: 96px;
|
||||
}
|
||||
|
||||
.fade-right {
|
||||
width: 160px;
|
||||
}
|
||||
|
||||
.track {
|
||||
scroll-snap-align: start;
|
||||
}
|
||||
}
|
||||
|
||||
.partner {
|
||||
padding: 24px 28px;
|
||||
border-radius: 16px;
|
||||
|
||||
@@ -19,7 +19,7 @@ iconJsonFiles.forEach((iconJsonFile) => {
|
||||
const iconName = path.basename(iconJsonFile, '.json');
|
||||
|
||||
iconMetaIndexFileImports.push(
|
||||
`import ${toCamelCase(iconName)}Metadata from '../../../icons/${iconName}.json';`,
|
||||
`import ${toCamelCase(iconName)}Metadata from '../../../icons/${iconName}.json' with { type: 'json' };`,
|
||||
);
|
||||
iconMetaIndexFileExports.push(` '${iconName}': ${toCamelCase(iconName)}Metadata,`);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user