Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer utilities {
@keyframes fade-in {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.animate-fade-in {
animation: fade-in 0.5s ease-in-out;
}
}
@layer base {
:root {
--background: 0 0% 100%; /* white */
--foreground: 224 71.4% 4.1%; /* gray-950 */
--muted: 220 14.3% 95.9%; /* gray-100 */
--muted-foreground: 220 8.9% 46.1%; /* gray-500 */
--popover: 0 0% 100%; /* white */
--popover-foreground: 224 71.4% 4.1%; /* gray-950 */
--card: 0 0% 100%; /* white */
--card-foreground: 224 71.4% 4.1%; /* gray-950 */
--border: 220 13% 91%; /* gray-200 */
--input: 216 12.2% 83.9%; /* gray-300 */
--primary: 220.9 39.3% 11%; /* gray-900 */
--primary-foreground: 210 20% 98%; /* gray-50 */
--secondary: 220 14.3% 95.9%; /* gray-100 */
--secondary-foreground: 220.9 39.3% 11%; /* gray-900 */
--accent: 220 14.3% 95.9%; /* gray-100 */
--accent-foreground: 220.9 39.3% 11%; /* gray-900 */
--destructive: 0 84.2% 60.2%; /* red-500 */
--destructive-foreground: 210 20% 98%; /* gray-50 */
--warning: 38 92% 50%; /* amber-500 */
--warning-foreground: 210 20% 98%; /* gray-50 */
--ring: 217.9 10.6% 64.9%; /* gray-400 */
--radius: 0.5rem; /* md */
--sidebar-background: 0 0% 98%; /* white */
--sidebar-foreground: 240 5.3% 26.1%; /* gray-900 */
--sidebar-primary: 240 5.9% 10%; /* gray-950 */
--sidebar-primary-foreground: 0 0% 98%; /* white */
--sidebar-accent: 240 4.8% 95.9%; /* gray-100 */
--sidebar-accent-foreground: 240 5.9% 10%; /* gray-950 */
--sidebar-border: 220 13% 91%; /* gray-200 */
--sidebar-ring: 217.2 91.2% 59.8%; /* gray-400 */
}
.dark {
--background: 224 71.4% 4.1%; /* gray-950 */
--foreground: 210 20% 98%; /* gray-50 */
--muted: 215 27.9% 16.9%; /* gray-800 */
--muted-foreground: 217.9 10.6% 64.9%; /* gray-400 */
--popover: 224 71.4% 4.1%; /* gray-950 */
--popover-foreground: 210 20% 98%; /* gray-50 */
--card: 224 71.4% 4.1%; /* gray-950 */
--card-foreground: 210 20% 98%; /* gray-50 */
--border: 215 27.9% 16.9%; /* gray-800 */
--input: 216.9 19.1% 26.7%; /* gray-700 */
--primary: 210 20% 98%; /* gray-50 */
--primary-foreground: 220.9 39.3% 11%; /* gray-900 */
--secondary: 215 27.9% 16.9%; /* gray-800 */
--secondary-foreground: 210 20% 98%; /* gray-50 */
--accent: 215 27.9% 16.9%; /* gray-800 */
--accent-foreground: 210 20% 98%; /* gray-50 */
--destructive: 0 62.8% 30.6%; /* red-900 */
--destructive-foreground: 0 85.7% 97.3%; /* red-50 */
--warning: 38 92% 30%; /* amber-800 */
--warning-foreground: 38 92% 95%; /* amber-50 */
--ring: 215 27.9% 16.9%; /* gray-800 */
--sidebar-background: 240 5.9% 10%; /* gray-950 */
--sidebar-foreground: 240 4.8% 95.9%; /* gray-100 */
--sidebar-primary: 224.3 76.3% 48%; /* blue-500 */
--sidebar-primary-foreground: 0 0% 100%; /* white */
--sidebar-accent: 240 3.7% 15.9%; /* gray-200 */
--sidebar-accent-foreground: 240 4.8% 95.9%; /* gray-950 */
--sidebar-border: 240 3.7% 15.9%; /* gray-200 */
--sidebar-ring: 217.2 91.2% 59.8%; /* gray-400 */
}
}
@layer base {
* {
@apply border-border;
}
body {
@apply bg-background text-foreground;
}
}
@layer utilities {
.touch-action-manipulation {
touch-action: manipulation;
}
.touch-action-pinch-zoom {
touch-action: pinch-zoom;
}
.transform-container {
transform-origin: 0 0;
will-change: transform;
}
.touch-zoom-container {
touch-action: none; /* Disable all browser handling */
-webkit-overflow-scrolling: touch;
isolation: isolate; /* Create a new stacking context */
contain: paint; /* Optimize rendering */
}
}
/* ─────────────────────────────────────────────────────────────────────────────
* Scroll mask utilities — adapted from https://twilson.net/scroll-mask
*
* Adds a soft mask-image fade to scroll containers so users can tell there is
* more content to scroll to. Pure CSS using scroll-driven animations: the
* `--scroll-mask-*-from` custom properties are interpolated by
* `animation-timeline: scroll(self ...)`, so the fade appears on the trailing
* edge of the scroll axis and disappears as you reach each end. No JS, no
* resize/scroll observers.
*
* Classes:
* .scroll-mask-y / .scroll-mask-x — fade both ends of an axis
* .scroll-mask-t / .scroll-mask-b — fade a single vertical edge
* .scroll-mask-l / .scroll-mask-r — fade a single horizontal edge
*
* Progressively enhanced via @supports — browsers without scroll-driven
* animations (Safari, Firefox at the time of writing) get the unmasked
* scroll container with no fallback, no degraded UX.
* ──────────────────────────────────────────────────────────────────────────── */
@property --scroll-mask-t-from {
syntax: "<length-percentage>";
inherits: false;
initial-value: 100%;
}
@property --scroll-mask-b-from {
syntax: "<length-percentage>";
inherits: false;
initial-value: 100%;
}
@property --scroll-mask-l-from {
syntax: "<length-percentage>";
inherits: false;
initial-value: 100%;
}
@property --scroll-mask-r-from {
syntax: "<length-percentage>";
inherits: false;
initial-value: 100%;
}
@keyframes scroll-mask-y-scroll {
0% {
--scroll-mask-t-from: 100%;
}
10%,
100% {
--scroll-mask-t-from: var(--scroll-mask-fade-from-t, 100%);
}
0%,
90% {
--scroll-mask-b-from: var(--scroll-mask-fade-from-b, 100%);
}
100% {
--scroll-mask-b-from: 100%;
}
}
@keyframes scroll-mask-x-scroll {
0% {
--scroll-mask-l-from: 100%;
}
10%,
100% {
--scroll-mask-l-from: var(--scroll-mask-fade-from-l, 100%);
}
0%,
90% {
--scroll-mask-r-from: var(--scroll-mask-fade-from-r, 100%);
}
100% {
--scroll-mask-r-from: 100%;
}
}
@supports (animation-timeline: scroll()) {
:where(
[class^="scroll-mask-"],
[class*=" scroll-mask-"]
) {
--scroll-mask-t: linear-gradient(
to top,
black,
black var(--scroll-mask-t-from),
transparent
);
--scroll-mask-b: linear-gradient(
to bottom,
black,
black var(--scroll-mask-b-from),
transparent
);
--scroll-mask-l: linear-gradient(
to left,
black,
black var(--scroll-mask-l-from),
transparent
);
--scroll-mask-r: linear-gradient(
to right,
black,
black var(--scroll-mask-r-from),
transparent
);
-webkit-mask-image: var(--scroll-mask-t), var(--scroll-mask-b),
var(--scroll-mask-l), var(--scroll-mask-r);
mask-image: var(--scroll-mask-t), var(--scroll-mask-b),
var(--scroll-mask-l), var(--scroll-mask-r);
-webkit-mask-composite: source-in;
mask-composite: intersect;
animation:
scroll-mask-y-scroll linear,
scroll-mask-x-scroll linear;
animation-timeline:
scroll(self block),
scroll(self inline);
}
}
@layer utilities {
.scroll-mask-t {
--scroll-mask-fade-from-t: 80%;
}
.scroll-mask-b {
--scroll-mask-fade-from-b: 80%;
}
.scroll-mask-y {
--scroll-mask-fade-from-t: 80%;
--scroll-mask-fade-from-b: 80%;
}
.scroll-mask-l {
--scroll-mask-fade-from-l: 80%;
}
.scroll-mask-r {
--scroll-mask-fade-from-r: 80%;
}
.scroll-mask-x {
--scroll-mask-fade-from-l: 80%;
--scroll-mask-fade-from-r: 80%;
}
}