OpenVuln / src /index.css
zRzRzRzRzRzRzR
fix: make repository index scrollable
bd899f8
Raw
History Blame Contribute Delete
5.88 kB
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
/* 暗色控制台体系:原生控件(select 弹层/滚动条/checkbox)跟随暗色 */
:root {
color-scheme: dark;
}
html,
body,
#root {
min-height: 100%;
}
select option {
background-color: #12151c;
color: #edeff4;
}
body {
@apply bg-surface text-ink font-sans;
font-feature-settings: "cv05" 1, "ss01" 1;
}
::selection {
background: rgba(237, 239, 244, 0.2);
color: #ffffff;
}
}
@layer utilities {
.focus-ring {
@apply focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/60 focus-visible:ring-offset-2 focus-visible:ring-offset-[#0C0E13];
}
/* 历史命名保留:与 .focus-ring 一致 */
.focus-ring-dark {
@apply focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/60 focus-visible:ring-offset-2 focus-visible:ring-offset-[#0C0E13];
}
.text-balance {
text-wrap: balance;
}
.openvuln-scrollbar {
scrollbar-width: thin;
scrollbar-color: rgba(237, 239, 244, 0.28) transparent;
}
.openvuln-scrollbar::-webkit-scrollbar {
width: 6px;
}
.openvuln-scrollbar::-webkit-scrollbar-track {
background: transparent;
}
.openvuln-scrollbar::-webkit-scrollbar-thumb {
border-radius: 999px;
background: rgba(237, 239, 244, 0.28);
}
.openvuln-scrollbar::-webkit-scrollbar-thumb:hover {
background: rgba(237, 239, 244, 0.42);
}
}
@layer components {
.openvuln-title {
color: #edeff4;
letter-spacing: -0.02em;
}
/* 大字报标题:第一行空心描边(hover 时微微填充) */
.openvuln-outline {
color: transparent;
-webkit-text-stroke: 1.5px rgba(237, 239, 244, 0.56);
transition: color 500ms cubic-bezier(0.22, 1, 0.36, 1);
}
h1:hover .openvuln-outline {
color: rgba(237, 239, 244, 0.12);
}
@supports not ((-webkit-text-stroke: 1px white)) {
.openvuln-outline {
color: rgba(237, 239, 244, 0.56);
}
}
/* 大字报标题整行印刷式抬升入场 */
.ov-line-mask {
display: block;
overflow: hidden;
padding-bottom: 0.12em;
}
.ov-line {
display: block;
transform: translateY(112%);
animation: ov-line-up 850ms cubic-bezier(0.19, 1, 0.22, 1) forwards;
}
.openvuln-title-mark {
position: relative;
display: inline-block;
-webkit-text-stroke: 0;
}
.openvuln-title-comma {
display: inline-block;
margin-left: 4px;
}
.openvuln-title-period {
width: 0.1em;
height: 0.1em;
margin-left: 0.1em;
border-radius: 999px;
background: rgba(237, 239, 244, 0.88);
}
@keyframes ov-line-up {
to {
transform: translateY(0);
}
}
/* 滚动进入视口的克制上浮 */
.ov-reveal {
opacity: 0;
transform: translateY(14px);
transition:
opacity 420ms cubic-bezier(0.22, 1, 0.36, 1),
transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}
.ov-reveal.ov-in {
opacity: 1;
transform: none;
}
/* 顶栏导航的下划线扫入 */
.ov-navlink {
position: relative;
}
.ov-navlink::after {
content: "";
position: absolute;
left: 0;
right: 0;
bottom: -4px;
height: 1px;
background: #edeff4;
transform: scaleX(0);
transform-origin: left;
transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}
.ov-navlink:hover::after,
.ov-navlink:focus-visible::after {
transform: scaleX(1);
}
/* 大字报标题:第二行实心,带极轻的金属纵向光泽 */
.openvuln-solid {
background: linear-gradient(180deg, #ffffff 0%, #eceef2 52%, #c2c8d2 100%);
background-clip: text;
-webkit-background-clip: text;
color: transparent;
}
/* 极淡的顶部纵深,用于扫描进度页 */
.openvuln-glow {
background: radial-gradient(ellipse 52% 30% at 50% 0%, rgba(237, 239, 244, 0.04), transparent 70%);
}
.openvuln-brand {
animation: openvuln-enter 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.openvuln-composer {
animation: openvuln-enter 760ms 90ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.openvuln-panel {
border: 1px solid #232833;
border-radius: 16px;
background: #12151c;
box-shadow: 0 20px 48px -24px rgba(0, 0, 0, 0.6);
}
/* hero 背景视频:原生暗色线网动画,向下淡入页面底色 */
.openvuln-hero-video {
position: absolute;
inset: 0 0 auto 0;
z-index: -10;
height: 720px;
overflow: hidden;
pointer-events: none;
}
.openvuln-hero-video video {
height: 100%;
width: 100%;
object-fit: cover;
}
.openvuln-hero-video::after {
content: "";
position: absolute;
inset: 0;
background: linear-gradient(
to bottom,
rgba(12, 14, 19, 0.38) 0%,
rgba(12, 14, 19, 0.18) 34%,
rgba(12, 14, 19, 0.55) 62%,
rgba(12, 14, 19, 0.94) 86%,
#0c0e13 100%
);
}
}
@keyframes openvuln-enter {
from {
opacity: 0;
transform: translateY(12px) scale(0.99);
}
to {
opacity: 1;
transform: translateY(0) scale(1);
}
}
@keyframes live-scan-sweep {
from {
transform: translateX(-105%);
}
to {
transform: translateX(305%);
}
}
.live-scan-sweep {
animation: live-scan-sweep 2.4s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
.openvuln-brand,
.openvuln-composer {
animation: none;
}
.live-scan-sweep {
animation: none;
transform: translateX(200%);
}
.openvuln-hero-video video {
display: none;
}
.ov-line {
animation: none;
transform: none;
}
.ov-reveal {
opacity: 1;
transform: none;
transition: none;
}
.ov-navlink::after {
transition: none;
}
}
body.openvuln-running {
overflow: hidden;
background: #0c0e13;
}
body.openvuln-running .app-shell-chrome {
display: none;
}