✨ feat(vscode): 代码阅读预览按住 ⌘ / Ctrl 点名字跳到定义

This commit is contained in:
cruldra committed 2026-09-25 12:54:45 +08:00
1 parent e5db1a2e65
commit 4e146eb48f
20 files changed
+870 -60

No files matched your search

@@ -94,11 +94,31 @@ body.vscode-high-contrast-light {
background: var(--kind);
}
/* 跳到定义的目标块:边框和底色往聚焦色闪三下(共 1.5 秒)再复原;减少动态效果时改成静止高亮同样长的时间 */
@keyframes cr-flash {
50% {
background: color-mix(in srgb, var(--vscode-focusBorder) 25%, transparent);
border-color: var(--vscode-focusBorder);
}
}
@keyframes cr-flash-still {
from, to {
background: color-mix(in srgb, var(--vscode-focusBorder) 25%, transparent);
border-color: var(--vscode-focusBorder);
}
}
.cr-block[data-flash] {
animation: cr-flash 500ms ease-in-out 3;
}
@media (prefers-reduced-motion: reduce) {
.cr-block,
.cr-guide {
transition: none;
}
.cr-block[data-flash] {
animation: cr-flash-still 1500ms;
}
}
.cr-badge {
@@ -134,6 +154,13 @@ body.vscode-high-contrast-light {
.cr-role-comment { color: var(--cr-comment); }
.cr-role-hint { color: var(--vscode-descriptionForeground); }
/* 按住 ⌘ / Ctrl 停在查得到定义的名字上:和编辑器里的链接一样 */
.cr-code [data-link] {
color: var(--vscode-editorLink-activeForeground);
text-decoration: underline;
cursor: pointer;
}
/* 属性表的属性名:界面字体,和值一样的行高,两边逐行对齐 */
.cr-prop-label {
font-size: 12.5px;