1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
|
@tailwind base; @tailwind components; @tailwind utilities;
@layer base { #swup-container, .page-wrapper, #content-wrapper { @apply !bg-transparent; }
#bg { @apply fixed top-0 left-0 w-full h-full object-cover -z-10; } }
@layer components { .custom-md a:not(.no-styling) { @apply relative rounded-md p-1 -m-1 font-medium text-[var(--primary)] underline decoration-[var(--link-underline)] decoration-1 decoration-dashed underline-offset-4 transition; box-decoration-break: clone; -webkit-box-decoration-break: clone; &:hover { @apply no-underline; } &::before { content: ''; @apply absolute inset-0 rounded-[inherit] -z-10 transition ease-out scale-[0.85] opacity-0; background: var(--btn-plain-bg-hover); } &:hover::before { @apply scale-100 opacity-100; } &:active::before { background: var(--btn-plain-bg-active); } }
.card-base { @apply rounded-[var(--radius-large)] overflow-hidden transition; background-color: rgba(255, 255, 255, 0.75); @supports (backdrop-filter: blur(1px)) { @apply backdrop-blur-xl; } } .dark .card-base { background-color: rgba(30, 41, 59, 0.75); } .card-shadow { @apply drop-shadow-[0_2px_4px_rgba(0,0,0,0.005)]; }
h1, h2, h3, h4, h5, h6, p, a, span, li, ul, ol, blockquote, code, pre, table, th, td, strong { @apply transition; } .expand-animation { @apply relative before:ease-out before:transition active:bg-none hover:before:bg-[var(--btn-plain-bg-hover)] active:before:bg-[var(--btn-plain-bg-active)] z-0 before:absolute before:rounded-[inherit] before:inset-0 before:scale-[0.85] hover:before:scale-100 before:-z-10; } .link { @apply transition rounded-md p-1 -m-1 expand-animation; } .link-lg { @apply transition rounded-md p-1.5 -m-1.5 expand-animation; } .link-underline { @apply transition underline decoration-2 decoration-dashed decoration-[var(--link-underline)] hover:decoration-[var(--link-hover)] active:decoration-[var(--link-active)] underline-offset-[0.25rem]; } .float-panel { @apply top-[5.25rem] rounded-[var(--radius-large)] overflow-hidden transition shadow-xl dark:shadow-none; background-color: rgba(255, 255, 255, 0.8); @supports (backdrop-filter: blur(1px)) { @apply backdrop-blur-xl; } } .dark .float-panel { background-color: rgba(30, 41, 59, 0.8); } .float-panel-closed { @apply -translate-y-1 opacity-0 pointer-events-none; } .os-scrollbar-horizontal, .os-scrollbar-vertical { background-color: rgba(255, 255, 255, 0.75) !important; @supports (backdrop-filter: blur(1px)) { backdrop-filter: blur(12px) !important; } } .dark .os-scrollbar-horizontal, .dark .os-scrollbar-vertical { background-color: rgba(30, 41, 59, 0.75) !important; } .search-panel mark { @apply bg-transparent text-[var(--primary)]; }
.btn-card { @apply transition flex items-center justify-center bg-[var(--card-bg)] hover:bg-[var(--btn-card-bg-hover)] active:bg-[var(--btn-card-bg-active)]; } .btn-card.disabled { @apply pointer-events-none text-black/10 dark:text-white/10; } .btn-plain { @apply transition relative flex items-center justify-center bg-none text-black/75 hover:text-[var(--primary)] dark:text-white/75 dark:hover:text-[var(--primary)]; &:not(.scale-animation) { @apply hover:bg-[var(--btn-plain-bg-hover)] active:bg-[var(--btn-plain-bg-active)]; } &.scale-animation { @apply expand-animation; &.current-theme-btn { @apply before:scale-100 before:opacity-100 before:bg-[var(--btn-plain-bg-hover)] text-[var(--primary)]; } } } .btn-regular { @apply transition flex items-center justify-center; color: var(--btn-content); background-color: rgba(226, 232, 240, 0.8); } .btn-regular:hover { background-color: rgba(203, 213, 225, 0.85); } .dark .btn-regular { background-color: rgba(51, 65, 85, 0.7); } .dark .btn-regular:hover { background-color: rgba(71, 85, 105, 0.8); } .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))]; } .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, .text-75, .text-50, .text-30, .text-25 { } .meta-icon { @apply w-8 h-8 transition rounded-md flex items-center justify-center text-[var(--btn-content)] mr-2; background-color: rgba(226, 232, 240, 0.8); } .dark .meta-icon { background-color: rgba(51, 65, 85, 0.7); } .with-divider { @apply before:content-['/'] before:ml-1.5 before:mr-1.5 before:text-[var(--meta-divider)] before:text-sm before:font-medium before:first-of-type:hidden before:transition; } }
.custom-md img { @apply cursor-zoom-in; } main.prose { @apply pt-16; } .page-wrapper > header { @apply pt-32; }
|