Commit 76bb7c892d

76bb7c892d3f6ef61a0647e1033f1919ddca8ec4

parent: da290b31bd

Unsigned

Duck <57977673+woducku@users.noreply.github.com> · 2026-05-13 13:15 UTC

Update style.scss

Layout: unified · split

docs/.vitepress/theme/styles/style.scss +37 −104
@@ -496,53 +496,7 @@ table tr:nth-child(odd) {
496496 }
497497}
498498
499::view-transition-group(root) {
500 animation-timing-function: $ease-in-expo;
501 z-index: 100;
502}
503
504::view-transition-new(root) {
505 animation: var(--switch-name) var(--switch-duration);
506 animation-fill-mode: both;
507 animation-timing-function: cubic-bezier(0.7, 0, 0.84, 0);
508}
509
510::view-transition-old(root),
511.dark::view-transition-old(root) {
512 animation: var(--switch-name) var(--switch-duration);
513 animation-fill-mode: both;
514 animation-timing-function: cubic-bezier(0.7, 0, 0.84, 0);
515}
516
517@keyframes scale {
518 0% {
519 mask-size: 0;
520 }
521 10% {
522 mask-size: 25vmax;
523 }
524 90% {
525 mask-size: 25vmax;
526 }
527 100% {
528 mask-size: 750vmax;
529 }
530}
531
532@keyframes scale-fast {
533 0% {
534 mask-size: 0;
535 }
536 10% {
537 mask-size: 25vmax;
538 }
539 87.5% {
540 mask-size: 25vmax;
541 }
542 100% {
543 mask-size: 750vmax;
544 }
545}
499/* View transition animations removed */
546500
547501/* auto-height */
548502.VPSidebarItem {
@@ -761,8 +715,9 @@ table tr:nth-child(odd) {
761715
762716 & > .menu,
763717 & > .VPLocalNavOutlineDropdown > button {
764 @apply bg-white/80! dark:bg-neutral-800/80! px-2 py-0.75 rounded-xl border
765 border-neutral-700/10 dark:border-neutral-300/10 backdrop-blur-md;
718 @apply bg-white! px-2 py-0.75 rounded-xl border
719 border-neutral-700/10 dark:border-neutral-300/10;
720 .dark & { background-color: #0d0e11 !important; }
766721 }
767722
768723 & > .VPLocalNavOutlineDropdown {
@@ -770,12 +725,11 @@ table tr:nth-child(odd) {
770725
771726 & > .items {
772727 @apply top-10 right-4 md:right-0 max-w-[calc(100%-32px)] sm:max-w-sm
773 bg-white/75! dark:bg-neutral-800/75! p-1 rounded-2xl border
774 border-neutral-700/10 dark:border-neutral-300/10 backdrop-blur-md
728 bg-white! p-1 rounded-2xl border
729 border-neutral-700/10 dark:border-neutral-300/10
775730 shadow-2xl shadow-black/5;
776731 left: unset;
777 transition-duration: 0.5s;
778 transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
732 .dark & { background-color: #0d0e11 !important; }
779733
780734 & > .header {
781735 @apply h-9 mb-2 bg-transparent;
@@ -849,7 +803,7 @@ table tr:nth-child(odd) {
849803}
850804
851805.VPNavBar {
852 @apply border-0 bg-white/60 dark:bg-neutral-900/60 transition-colors;
806 @apply border-0 bg-white/60 dark:bg-neutral-900/60;
853807
854808 & > .container {
855809 & > .content,
@@ -942,10 +896,11 @@ table tr:nth-child(odd) {
942896 }
943897
944898 @media (max-width: 959.9px) {
945 @apply max-w-68 translate-x-2 translate-y-2 p-1! bg-white/85
946 dark:bg-neutral-800/85 border dark:border-neutral-700 border-neutral-200
947 rounded-3xl backdrop-blur shadow-lg overflow-x-hidden overflow-y-auto
899 @apply max-w-68 translate-x-2 translate-y-2 p-1! bg-white!
900 border dark:border-neutral-700 border-neutral-200
901 rounded-3xl shadow-lg overflow-x-hidden overflow-y-auto
948902 max-h-dvh;
903 .dark & { background-color: #0d0e11 !important; }
949904 height: calc(100dvh - 1rem);
950905
951906 & > .nav {
@@ -971,7 +926,8 @@ table tr:nth-child(odd) {
971926
972927 & > .shell {
973928 /* 688px is the max-width of the content (Vitepress default) */
974 --uno: "gap-0! md:max-w-[688px] px-0! pt-0.5! md:translate-x-2 bg-white! md:bg-white/70! dark:bg-neutral-900! md:dark:bg-neutral-900/90! md:backdrop-blur-xl md:rounded-2xl! md:border dark:border-neutral-700 md:shadow-xl shadow-black/5";
929 --uno: "gap-0! md:max-w-[688px] px-0! pt-0.5! md:translate-x-2 bg-white! md:bg-white! md:rounded-2xl! md:border dark:border-neutral-700 md:shadow-xl shadow-black/5";
930 .dark & { background-color: #0d0e11 !important; }
975931
976932 & > .search-bar {
977933 --uno: "w-full py-1.5 px-2 border-0 border-b border-neutral-400/25! dark:border-neutral-600/65! rounded-none";
@@ -1043,12 +999,13 @@ table tr:nth-child(odd) {
1043999}
10441000
10451001.VPNavBarMenuGroup > .menu {
1046 @apply top-12 backdrop-blur-xl rounded-2xl;
1002 @apply top-12 rounded-2xl;
10471003 will-change: opacity;
10481004
10491005 & > .VPMenu {
1050 @apply bg-white/80! dark:bg-neutral-700/80! p-1 border border-neutral-100
1006 @apply bg-white! p-1 border border-neutral-100
10511007 dark:border-neutral-700 rounded-2xl shadow-2xl shadow-black/5;
1008 .dark & { background-color: #0d0e11 !important; }
10521009
10531010 & > .items {
10541011 & > .VPMenuLink > .VPLink {
@@ -1060,12 +1017,13 @@ table tr:nth-child(odd) {
10601017}
10611018
10621019.VPNavBarExtra.extra > .menu {
1063 @apply top-12 backdrop-blur-xl rounded-2xl;
1020 @apply top-12 rounded-2xl;
10641021 will-change: opacity;
10651022
10661023 & > .VPMenu {
1067 @apply bg-white/80! dark:bg-neutral-700/80! border border-neutral-100
1024 @apply bg-white! border border-neutral-100
10681025 dark:border-neutral-700 rounded-2xl shadow-2xl shadow-black/5;
1026 .dark & { background-color: #0d0e11 !important; }
10691027 }
10701028}
10711029
@@ -1081,7 +1039,8 @@ table tr:nth-child(odd) {
10811039
10821040 & > .VPFlyout.VPNavBarMenuGroup > .button,
10831041 & > a {
1084 @apply backdrop-blur-lg bg-white/80 dark:bg-neutral-900/70;
1042 @apply bg-white!;
1043 .dark & { background-color: #0d0e11 !important; }
10851044 }
10861045
10871046 /* Skip screen reader content */
@@ -1092,7 +1051,8 @@ table tr:nth-child(odd) {
10921051}
10931052
10941053.VPNavBarAppearance.appearance {
1095 @apply h-11 bg-white/80 dark:bg-neutral-900/70 backdrop-blur-lg rounded-l-3xl;
1054 @apply h-11 bg-white! rounded-l-3xl;
1055 .dark & { background-color: #0d0e11 !important; }
10961056
10971057 &::before {
10981058 @apply hidden;
@@ -1100,15 +1060,17 @@ table tr:nth-child(odd) {
11001060}
11011061
11021062.VPSocialLinks.VPNavBarSocialLinks.social-links {
1103 @apply h-11 pr-0! pl-1.5! bg-white/80 dark:bg-neutral-900/70 backdrop-blur-lg;
1063 @apply h-11 pr-0! pl-1.5! bg-white!;
1064 .dark & { background-color: #0d0e11 !important; }
11041065}
11051066
11061067/* ... mobile */
11071068.VPFlyout.VPNavBarExtra.extra {
1108 @apply h-11 bg-white/80 dark:bg-neutral-900/70;
1069 @apply h-11 bg-white!;
1070 .dark & { background-color: #0d0e11 !important; }
11091071
11101072 & > .button {
1111 @apply h-10.5 backdrop-blur-lg rounded-r-3xl!;
1073 @apply h-10.5 rounded-r-3xl!;
11121074 }
11131075}
11141076
@@ -1117,7 +1079,7 @@ table tr:nth-child(odd) {
11171079#local-search {
11181080 & > .DocSearch-Button {
11191081 @apply hover:scale-[1.03] focus:scale-[1.03] active:scale-[0.98]
1120 transition-all! h-10 rounded-xl backdrop-blur-sm lg:ml-2 sm:bg-red-50;
1082 h-10 rounded-xl lg:ml-2 sm:bg-red-50;
11211083 color: var(--docsearch-secondary-text-color);
11221084
11231085 @media (width >= 40rem /* 640px */) {
@@ -1286,8 +1248,8 @@ table tr:nth-child(odd) {
12861248 overflow-y: auto;
12871249 overscroll-behavior: contain;
12881250 @extend %thin-scrollbar;
1289
12901251 .dark & {
1252 background-color: #0d0e11;
12911253 box-shadow: var(--vp-shadow-1);
12921254 }
12931255}
@@ -1301,6 +1263,7 @@ table tr:nth-child(odd) {
13011263 align-items: center;
13021264 background-color: var(--vp-sidebar-bg-color);
13031265 border-bottom: 1px solid var(--vp-c-divider);
1266 .dark & { background-color: #0d0e11; }
13041267}
13051268
13061269.home-sidebar-logo {
@@ -1322,24 +1285,7 @@ table tr:nth-child(odd) {
13221285 padding-top: 10px;
13231286}
13241287
1325/* Desktop sidebar transitions */
1326.home-fade-enter-active,
1327.home-fade-leave-active {
1328 transition: opacity 0.25s;
1329}
1330
1331.home-fade-enter-from,
1332.home-fade-leave-to {
1333 opacity: 0;
1334}
1335
1336.home-slide-enter-active {
1337 transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.25s;
1338}
1339
1340.home-slide-leave-active {
1341 transition: transform 0.25s ease, opacity 0.5s;
1342}
1288/* Desktop sidebar transitions removed */
13431289
13441290.home-slide-enter-from,
13451291.home-slide-leave-to {
@@ -1354,9 +1300,10 @@ table tr:nth-child(odd) {
13541300
13551301/* Home NavScreen: restyle as left-aligned floating panel matching VPSidebar */
13561302.VPNavScreen:has(.home-screen-nav) {
1357 @apply bg-white/85 dark:bg-neutral-800/85
1303 @apply bg-white!
13581304 border dark:border-neutral-700 border-neutral-200
1359 rounded-3xl backdrop-blur shadow-lg;
1305 rounded-3xl shadow-lg;
1306 .dark & { background-color: #0d0e11 !important; }
13601307 padding: 0 !important;
13611308 left: 0.5rem !important;
13621309 right: auto !important;
@@ -1391,21 +1338,7 @@ table tr:nth-child(odd) {
13911338 padding-top: 8px;
13921339}
13931340
1394/* Override NavScreen fade transition to slide-from-left on home */
1395.VPNavScreen:has(.home-screen-nav) {
1396 &.fade-enter-active,
1397 &.fade-leave-active {
1398 transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.25s !important;
1399
1400 .container { transform: none !important; }
1401 }
1402
1403 &.fade-enter-from,
1404 &.fade-leave-to {
1405 transform: translateX(-100%) !important;
1406 opacity: 0 !important;
1407 }
1408}
1341/* NavScreen slide transition removed */
14091342
14101343/* Icon tooltips (hover on desktop, tap on mobile) */
14111344.icon-tip {