| @import 'tailwindcss';
|
| @import './layout-styles.css';
|
| @import './navbar.css';
|
| @import './waves.css';
|
| @import './transition.css';
|
| @import './custom-scrollbar.css';
|
|
|
| @plugin '@tailwindcss/typography';
|
|
|
|
|
| @custom-variant dark (&:where(.dark, .dark *));
|
|
|
|
|
| @theme {
|
| --font-sans:
|
| 'Roboto', 'sans-serif', ui-sans-serif, system-ui, sans-serif,
|
| 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
|
| }
|
|
|
|
|
| @utility expand-animation {
|
| position: relative;
|
| z-index: 0;
|
| &::before {
|
| content: '';
|
| position: absolute;
|
| inset: 0;
|
| border-radius: inherit;
|
| scale: 0.85;
|
| z-index: -10;
|
| transition: all 0.15s ease-out;
|
| }
|
| &:hover::before {
|
| background-color: var(--btn-plain-bg-hover);
|
| scale: 1;
|
| }
|
| &:active::before {
|
| background-color: var(--btn-plain-bg-active);
|
| }
|
| &:active {
|
| background: none;
|
| }
|
| }
|
|
|
|
|
| html {
|
| scroll-behavior: smooth;
|
| }
|
|
|
|
|
| .top-gradient-highlight {
|
| position: fixed;
|
| top: 0;
|
| left: 0;
|
| right: 0;
|
| height: 180px;
|
| background: linear-gradient(to bottom, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.3) 30%, rgba(255, 255, 255, 0.15) 60%, rgba(255, 255, 255, 0.05) 80%, transparent 100%);
|
| pointer-events: none;
|
| z-index: 20;
|
| transition: all var(--duration-medium) var(--ease-standard);
|
| }
|
|
|
|
|
| :root.dark .top-gradient-highlight {
|
| background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.3) 30%, rgba(0, 0, 0, 0.15) 60%, rgba(0, 0, 0, 0.05) 80%, transparent 100%);
|
| }
|
|
|
| @layer components {
|
|
|
|
|
| ::view-transition-old(root),
|
| ::view-transition-new(root) {
|
| animation-duration: 0.5s;
|
| animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
|
| mix-blend-mode: normal;
|
| }
|
|
|
|
|
| ::view-transition-group(root) {
|
| animation-duration: 0.5s;
|
| animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
| }
|
|
|
|
|
| ::view-transition-old(root) {
|
| animation-name: theme-fade-out;
|
|
|
| z-index: 2;
|
| }
|
|
|
|
|
| ::view-transition-new(root) {
|
| animation-name: theme-fade-in;
|
|
|
| z-index: 1;
|
| }
|
|
|
|
|
| @keyframes theme-fade-out {
|
| 0% {
|
| opacity: 1;
|
| }
|
| 100% {
|
| opacity: 0;
|
| }
|
| }
|
|
|
|
|
| @keyframes theme-fade-in {
|
| 0% {
|
| opacity: 0;
|
| }
|
| 100% {
|
| opacity: 1;
|
| }
|
| }
|
|
|
|
|
| .transition,
|
| [class*="border"],
|
| [class*="transition"] {
|
| transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
|
| transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
| transition-duration: 0.15s;
|
| }
|
|
|
|
|
|
|
| .is-theme-transitioning:not(.use-view-transition) *,
|
| .is-theme-transitioning:not(.use-view-transition) *::before,
|
| .is-theme-transitioning:not(.use-view-transition) *::after {
|
| transition: none !important;
|
| animation: none !important;
|
| }
|
|
|
|
|
|
|
| .is-theme-transitioning .expressive-code,
|
| .is-theme-transitioning .expressive-code * {
|
| transition: none !important;
|
| animation: none !important;
|
| will-change: auto !important;
|
| }
|
|
|
|
|
| .is-theme-transitioning:not(.use-view-transition) .float-panel,
|
| .is-theme-transitioning:not(.use-view-transition) .float-panel *,
|
| .is-theme-transitioning:not(.use-view-transition) .music-player,
|
| .is-theme-transitioning:not(.use-view-transition) .music-player *,
|
| .is-theme-transitioning:not(.use-view-transition) .widget,
|
| .is-theme-transitioning:not(.use-view-transition) .widget *,
|
| .is-theme-transitioning:not(.use-view-transition) .dropdown-content,
|
| .is-theme-transitioning:not(.use-view-transition) .dropdown-content * {
|
| transition: none !important;
|
| animation: none !important;
|
| }
|
|
|
|
|
| .is-theme-transitioning:not(.use-view-transition) .post-card,
|
| .is-theme-transitioning:not(.use-view-transition) .widget,
|
| .is-theme-transitioning:not(.use-view-transition) .float-panel {
|
| contain: layout style paint !important;
|
| }
|
|
|
|
|
| .is-theme-transitioning:not(.use-view-transition) svg use {
|
|
|
| transition: none;
|
|
|
| fill: currentColor;
|
| }
|
|
|
|
|
| .is-theme-transitioning:not(.use-view-transition) #navbar > div,
|
| .is-theme-transitioning:not(.use-view-transition) #navbar[data-transparent-mode] > div,
|
| .is-theme-transitioning:not(.use-view-transition) #navbar[data-transparent-mode].scrolled > div,
|
| .is-theme-transitioning:not(.use-view-transition) body.wallpaper-transparent #navbar > div,
|
| .is-theme-transitioning:not(.use-view-transition) body.wallpaper-transparent #navbar[data-transparent-mode] > div,
|
| .is-theme-transitioning:not(.use-view-transition) body.wallpaper-transparent #navbar[data-transparent-mode].scrolled > div,
|
| .is-theme-transitioning:not(.use-view-transition) #banner-wrapper ~ * #navbar > div,
|
| .is-theme-transitioning:not(.use-view-transition) #banner-wrapper ~ * #navbar[data-transparent-mode] > div,
|
| .is-theme-transitioning:not(.use-view-transition) body:has(#banner-wrapper) #navbar > div,
|
| .is-theme-transitioning:not(.use-view-transition) body:has(#banner-wrapper) #navbar[data-transparent-mode] > div {
|
| transition: none !important;
|
| backdrop-filter: none !important;
|
| }
|
|
|
|
|
| .is-theme-transitioning .dropdown-content,
|
| .is-theme-transitioning .float-panel,
|
| .is-theme-transitioning #display-setting,
|
| .is-theme-transitioning #nav-menu-panel,
|
| .is-theme-transitioning #translate-panel,
|
| .is-theme-transitioning #mobile-toc-panel,
|
| .is-theme-transitioning #search-panel {
|
| transition: none !important;
|
| backdrop-filter: none !important;
|
| }
|
|
|
|
|
| .is-theme-transitioning #header-waves {
|
|
|
| color: var(--page-bg);
|
|
|
| isolation: isolate;
|
|
|
| contain: layout style paint;
|
|
|
| transform: translateZ(0);
|
|
|
| background: transparent;
|
| }
|
|
|
| .is-theme-transitioning #header-waves use {
|
|
|
| will-change: transform;
|
|
|
| transform: translateZ(0);
|
| }
|
|
|
| .card-base {
|
| @apply rounded-(--radius-large) overflow-hidden bg-(--card-bg) transition-colors duration-150;
|
| }
|
| .card-base-transparent {
|
| @apply rounded-(--radius-large) overflow-hidden bg-(--card-bg-transparent) transition-colors duration-150;
|
| }
|
|
|
|
|
| .enable-card-border .card-base {
|
| @apply transition-all duration-300 border border-(--line-divider) shadow-xs;
|
| }
|
| .enable-card-border .card-base-transparent {
|
| @apply transition-all duration-300 border border-(--line-divider) shadow-xs;
|
| }
|
|
|
|
|
| .enable-card-border #navbar > div:not(.absolute) {
|
| @apply transition-all duration-300 border shadow-xs;
|
| border-color: var(--line-divider) !important;
|
| }
|
|
|
|
|
| .wallpaper-transparent .card-base {
|
| background-color: var(--card-bg-transparent) !important;
|
| }
|
|
|
|
|
| .wallpaper-transparent #navbar > div {
|
| background-color: var(--card-bg-transparent) !important;
|
| }
|
|
|
| .wallpaper-transparent .btn-card {
|
| background-color: var(--card-bg-transparent) !important;
|
| }
|
|
|
| h1, h2, h3, h4, h5, h6, p, a, span, li, ul, ol, blockquote, code, pre, table, th, td, strong {
|
| @apply transition-colors duration-150;
|
| }
|
| .card-shadow {
|
| @apply drop-shadow-[0_2px_4px_rgba(0,0,0,0.005)]
|
| }
|
| .link {
|
| @apply transition-colors duration-150 rounded-md p-1 -m-1 expand-animation;
|
| }
|
| .link-lg {
|
| @apply transition-colors duration-150 rounded-md p-1.5 -m-1.5 expand-animation;
|
| }
|
| .float-panel {
|
| @apply top-21 rounded-(--radius-large) overflow-hidden bg-(--card-bg) transition-colors duration-150 shadow-xl border border-black/5 dark:border-white/10
|
| }
|
| .float-panel-closed {
|
| @apply -translate-y-1 opacity-0 pointer-events-none
|
| }
|
| .float-panel-closed * {
|
| @apply pointer-events-none
|
| }
|
| .search-panel mark {
|
| @apply bg-transparent text-(--primary)
|
| }
|
|
|
| .btn-card {
|
| @apply transition-colors duration-150 flex items-center justify-center bg-(--card-bg) hover:bg-(--btn-card-bg-hover)
|
| active:bg-(--btn-card-bg-active)
|
| }
|
| .btn-card.disabled {
|
| @apply pointer-events-none text-black/10 dark:text-white/10
|
| }
|
| .btn-plain {
|
| @apply transition-colors duration-150 relative flex items-center justify-center bg-none
|
| text-black/75 hover:text-(--primary) dark:text-white/75 dark:hover:text-(--primary);
|
| &:not(.scale-animation) {
|
| @apply hover:bg-(--btn-plain-bg-hover) active:bg-(--btn-plain-bg-active)
|
| }
|
| &.scale-animation {
|
| @apply expand-animation;
|
| }
|
| }
|
| .current-theme-btn {
|
| @apply bg-(--btn-plain-bg-hover) text-(--primary);
|
| }
|
| .btn-regular {
|
| @apply transition-colors duration-150 flex items-center justify-center bg-(--btn-regular-bg) hover:bg-(--btn-regular-bg-hover) active:bg-(--btn-regular-bg-active)
|
| text-(--btn-content) dark:text-white/75
|
| }
|
|
|
| .link-underline {
|
| @apply transition-colors duration-150 underline decoration-2 decoration-dashed decoration-(--link-underline)
|
| hover:decoration-(--link-hover) active:decoration-(--link-active) underline-offset-[0.25rem]
|
| }
|
|
|
| .toc-hide,
|
| .toc-not-ready {
|
| @apply opacity-0 pointer-events-none
|
| }
|
|
|
| /* #toc-inner-wrapper {
|
| mask-image: linear-gradient(to bottom, transparent 0%, black 2rem, black calc(100% - 2rem), transparent 100%);
|
| } */
|
|
|
| .hide-scrollbar {
|
| scrollbar-width: none;
|
| -ms-overflow-style: none;
|
| }
|
| .hide-scrollbar::-webkit-scrollbar {
|
| display: none;
|
| }
|
|
|
| .text-90 {
|
| @apply text-black/90 dark:text-white/90
|
| }
|
| .text-75 {
|
| @apply text-black/75 dark:text-white/75
|
| }
|
| .text-50 {
|
| @apply text-black/50 dark:text-white/50
|
| }
|
| .text-30 {
|
| @apply text-black/30 dark:text-white/30
|
| }
|
| .text-25 {
|
| @apply text-black/25 dark:text-white/25
|
| }
|
|
|
| /* 下拉菜单样式 */
|
| .dropdown-container {
|
| @apply relative;
|
| }
|
|
|
| .dropdown-menu {
|
| @apply absolute top-full left-0 pt-2 opacity-0 invisible pointer-events-none transition-all duration-200 ease-out transform translate-y-[-8px] z-50;
|
| }
|
|
|
| .dropdown-container:hover .dropdown-menu,
|
| .dropdown-container:focus-within .dropdown-menu {
|
| @apply opacity-100 visible pointer-events-auto translate-y-0;
|
| }
|
|
|
| .dropdown-container:hover .dropdown-arrow,
|
| .dropdown-container:focus-within .dropdown-arrow {
|
| @apply rotate-180;
|
| }
|
|
|
| .dropdown-content {
|
| @apply bg-(--card-bg) rounded-(--radius-large) shadow-xl border border-black/5 dark:border-white/10 py-2 min-w-48;
|
| }
|
|
|
| .dropdown-item {
|
| @apply flex items-center justify-between px-4 py-2.5 text-black/75 dark:text-white/75 hover:text-(--primary) hover:bg-(--btn-plain-bg-hover) transition-colors duration-150 font-medium;
|
| }
|
|
|
| .dropdown-item:first-child {
|
| @apply rounded-t-[calc(var(--radius-large)-0.5rem)];
|
| }
|
|
|
| .dropdown-item:last-child {
|
| @apply rounded-b-[calc(var(--radius-large)-0.5rem)];
|
| }
|
|
|
|
|
| .mobile-submenu {
|
| @apply max-h-0 overflow-hidden transition-all duration-300 ease-in-out;
|
| }
|
|
|
| .mobile-dropdown[data-expanded="true"] .mobile-submenu {
|
| @apply max-h-96;
|
| }
|
|
|
| .mobile-dropdown[data-expanded="true"] .mobile-dropdown-arrow {
|
| @apply rotate-180;
|
| }
|
|
|
|
|
| @media (max-width: 768px) {
|
| .dropdown-container {
|
| @apply hidden;
|
| }
|
| }
|
|
|
|
|
| .dropdown-container:focus-within .dropdown-menu {
|
| @apply opacity-100 visible pointer-events-auto translate-y-0;
|
| }
|
|
|
| .dropdown-item:focus {
|
| @apply outline-hidden;
|
| }
|
|
|
| .mobile-dropdown button:focus {
|
| @apply outline-hidden;
|
| }
|
|
|
| .meta-icon {
|
| @apply w-8 h-8 transition-colors duration-150 rounded-md flex items-center justify-center bg-(--btn-regular-bg)
|
| text-(--btn-content) mr-2
|
| }
|
| .with-divider {
|
| @apply before:content-['/'] before:ml-1.5 before:mr-1.5 before:text-(--meta-divider) before:text-sm
|
| before:font-medium before:first-of-type:hidden before:transition-colors before:duration-150
|
| }
|
|
|
| .btn-regular-dark {
|
| @apply flex items-center justify-center
|
| bg-[oklch(0.45_0.01_var(--hue))] hover:bg-[oklch(0.50_0.01_var(--hue))] active:bg-[oklch(0.55_0.01_var(--hue))]
|
| dark:bg-[oklch(0.30_0.02_var(--hue))] dark:hover:bg-[oklch(0.35_0.03_var(--hue))] dark:active:bg-[oklch(0.40_0.03_var(--hue))]
|
| }
|
| .btn-regular-dark.success {
|
| @apply bg-[oklch(0.75_0.14_var(--hue))] dark:bg-[oklch(0.75_0.14_var(--hue))]
|
| }
|
| }
|
|
|
| .custom-md img, #post-cover img {
|
| @apply cursor-zoom-in
|
| }
|
|
|
| ::selection {
|
| background-color: var(--selection-bg)
|
| }
|
|
|
| .dash-line {
|
| position: relative;
|
| }
|
|
|
| .dash-line::before {
|
| content: "";
|
| position: absolute;
|
| width: 10%;
|
| height: 100%;
|
| left: calc(50% - 1px);
|
| border-left: 2px dashed var(--line-color);
|
| pointer-events: none;
|
| transition: all 0.3s;
|
| transform: translateY(-50%);
|
| }
|
|
|
|
|
|
|
| .custom-md spoiler {
|
| --_spoiler-mask: var(--primary);
|
| @apply hover:bg-transparent px-1 py-0.5 overflow-hidden rounded-md transition-all duration-150;
|
| background-color: var(--_spoiler-mask);
|
| box-decoration-break: clone;
|
| &:not(:hover) {
|
| color: var(--_spoiler-mask);
|
| * {
|
| color: var(--_spoiler-mask);
|
| }
|
| }
|
| }
|
|
|
|
|
| :root:not(.dark) .custom-md spoiler {
|
| --_spoiler-mask: color-mix(in oklch, var(--primary) 55%, white 45%);
|
| }
|
|
|
|
|
| .post-list-layout-switch {
|
| @apply flex items-center gap-2 mb-6 p-3 bg-(--card-bg) rounded-lg border border-(--line-divider);
|
| }
|
|
|
| .post-list-layout-switch span {
|
| @apply text-sm text-(--text-secondary);
|
| }
|
|
|
| .post-list-layout-switch .layout-buttons {
|
| @apply flex gap-1;
|
| }
|
|
|
| .post-list-layout-switch button {
|
| @apply px-3 py-1.5 text-sm rounded-md transition-colors;
|
| }
|
|
|
| .post-list-layout-switch button.active {
|
| @apply bg-(--primary) text-white;
|
| }
|
|
|
| .post-list-layout-switch button:not(.active) {
|
| @apply bg-(--bg-secondary) text-(--text-secondary) hover:bg-(--bg-hover);
|
| }
|
|
|
|
|
| .post-list-container.grid-mode .post-card-item {
|
| @apply w-full;
|
| }
|
|
|
| .post-list-container.grid-mode .post-card-item a[href] {
|
| @apply text-xl before:h-4 before:top-[28px] before:left-[-18px] truncate;
|
| display: -webkit-box;
|
| -webkit-line-clamp: 2;
|
| -webkit-box-orient: vertical;
|
| overflow: hidden;
|
| text-overflow: ellipsis;
|
| line-height: 1.4;
|
| max-height: 2.8em;
|
| }
|
|
|
| .post-list-container.grid-mode .post-card-item a[aria-label] {
|
| @apply hidden;
|
| }
|
|
|
| .post-list-container.grid-mode .post-card-item .btn-regular {
|
| @apply hidden;
|
| }
|
|
|
| .post-list-container.grid-mode .post-card-item .line-clamp-1 {
|
| @apply line-clamp-2;
|
| }
|
|
|
|
|
| .post-list-container.grid-mode .post-card-item > div {
|
| @apply p-4;
|
| }
|
|
|
|
|
| .post-list-container.grid-mode .post-card-item .post-meta {
|
| @apply mb-2;
|
| }
|
|
|
|
|
| .post-list-container.grid-mode .post-card-item .description {
|
| @apply text-sm mb-2 line-clamp-2;
|
| }
|
|
|
|
|
| .post-list-container.grid-mode .post-card-item .stats {
|
| @apply text-xs;
|
| }
|
|
|
|
|
| .device-mobile .pagination-info {
|
| @apply text-xs;
|
| }
|
|
|
| .device-tablet .pagination-info {
|
| @apply text-sm;
|
| }
|
|
|
| .device-desktop .pagination-info {
|
| @apply text-base;
|
| }
|
|
|
|
|
| .pagination-info {
|
| @apply text-sm text-(--text-secondary) text-center mb-2;
|
| } |