feat: add design tokens and css tooling

This commit is contained in:
thePR0M3TH3AN committed 2025-10-09 20:53:40 -04:00
1 parent 6376e73951
commit 143abc8fd1
11 files changed
+1764 -123

No files matched your search

+12 -9
View File
@@ -62,7 +62,6 @@ To run **bitvid** locally:
```
2. Start a local server:
- Using Python:
```bash
python -m http.server 8000
@@ -73,24 +72,28 @@ To run **bitvid** locally:
```
3. Open the site in your browser:
```
http://localhost:8000
```
### CSS build pipeline
Tailwind utilities are generated from `css/tailwind.source.css` using the build
script below. Run this whenever you add or remove classes in HTML or JavaScript
so the purged output stays in sync:
Tailwind utilities are generated from `css/tailwind.source.css` and themed via
the shared tokens in `css/tokens.css`. Install dependencies once and lean on the
package scripts to keep formatting, linting, and generated output consistent:
```bash
npm install # first run only
npm run build:css
npm install # install Prettier, Stylelint, and Tailwind toolchain
npm run format # format CSS/HTML/JS/MD with Prettier + tailwindcss plugin
npm run lint:css # enforce token usage and forbid raw hex colors
npm run build:css # rebuild css/tailwind.generated.css from tailwind.source.css
npm run check:css # CI-friendly guard that fails if tailwind.generated.css is dirty
```
The command compiles Tailwind with `tailwind.config.cjs`, runs it through the
PostCSS pipeline defined in `postcss.config.cjs` (for autoprefixing), and emits
the purged, minified stylesheet at `css/tailwind.generated.css`. Commit the
The build command compiles Tailwind with `tailwind.config.cjs`, runs it through
the PostCSS pipeline defined in `postcss.config.cjs` (for autoprefixing), and
emits the purged, minified stylesheet at `css/tailwind.generated.css`. Commit the
regenerated file alongside any template changes so deployments pick up the
latest styles.
+164 -104
View File
@@ -1,24 +1,6 @@
@import "./tokens.css";
:root {
/*
Core palette tokens used across the application.
--color-page keeps the primary content surface neutral while --color-surface
powers the dark shells (sidebar, dialogs, cards).
*/
--color-page: #ffffff;
--color-surface: #0f172a;
--color-bg: var(--color-surface);
--color-card: #1e293b;
--color-card-private: #3b1d74;
--color-primary: #fe0032;
--color-secondary: #ff93a5;
--color-card-critical: #3f0b13;
--color-text: #f8fafc;
--color-text-strong: #0f172a;
--color-muted: #94a3b8;
--shadow-sm: 0 0.0625rem 0.125rem 0 rgb(0 0 0 / 0.05);
--shadow-md: 0 0.25rem 0.375rem -0.0625rem rgb(0 0 0 / 0.1);
--shadow-lg: 0 0.625rem 0.9375rem -0.1875rem rgb(0 0 0 / 0.1);
--modal-motion-duration: 160ms;
--scrollbar-width: 0.5rem;
--scrollbar-track: rgba(255, 255, 255, 0.1);
--scrollbar-thumb: rgba(255, 255, 255, 0.3);
@@ -73,7 +55,7 @@ html {
/* Core Styles */
body {
font-family: system-ui, -apple-system, sans-serif;
font-family: var(--font-family-sans);
background-color: var(--color-page);
color: var(--color-text-strong);
line-height: 1.5;
@@ -176,11 +158,15 @@ header img {
.video-card.video-card--owner-private {
background-color: var(--color-card-private) !important;
box-shadow: 0 0 0 0.125rem rgba(168, 85, 247, 0.55), var(--shadow-md);
box-shadow:
0 0 0 0.125rem rgba(168, 85, 247, 0.55),
var(--shadow-md);
}
.video-card.video-card--owner-private:hover {
box-shadow: 0 0 0 0.125rem rgba(192, 132, 252, 0.65), var(--shadow-lg);
box-shadow:
0 0 0 0.125rem rgba(192, 132, 252, 0.65),
var(--shadow-lg);
}
.video-visibility-toggle {
@@ -208,8 +194,12 @@ header img {
padding: 0.4rem 0.95rem;
text-transform: uppercase;
cursor: pointer;
transition: background-color 0.18s ease, color 0.18s ease,
border-color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
transition:
background-color 0.18s ease,
color 0.18s ease,
border-color 0.18s ease,
box-shadow 0.18s ease,
opacity 0.18s ease;
}
.video-visibility-toggle__option:not(.is-disabled):hover {
@@ -218,10 +208,15 @@ header img {
}
.video-visibility-toggle__option[data-active="true"] {
background: linear-gradient(135deg, rgba(129, 140, 248, 0.4), rgba(192, 132, 252, 0.32));
color: #f8fafc;
background: linear-gradient(
135deg,
rgba(129, 140, 248, 0.4),
rgba(192, 132, 252, 0.32)
);
color: var(--color-text);
border-color: rgba(129, 140, 248, 0.6);
box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.4) inset,
box-shadow:
0 0 0 1px rgba(129, 140, 248, 0.4) inset,
0 6px 14px -6px rgba(129, 140, 248, 0.55);
}
@@ -240,11 +235,15 @@ header img {
.video-card[data-owner-is-viewer="true"][data-url-health-state="offline"][data-stream-health-state="unhealthy"] {
background-color: var(--color-card-critical);
box-shadow: 0 0 0 0.0625rem rgba(239, 68, 68, 0.35), var(--shadow-md);
box-shadow:
0 0 0 0.0625rem rgba(239, 68, 68, 0.35),
var(--shadow-md);
}
.video-card[data-owner-is-viewer="true"][data-url-health-state="offline"][data-stream-health-state="unhealthy"]:hover {
box-shadow: 0 0 0 0.0625rem rgba(239, 68, 68, 0.45), var(--shadow-lg);
box-shadow:
0 0 0 0.0625rem rgba(239, 68, 68, 0.45),
var(--shadow-lg);
}
.video-card--enter {
@@ -263,7 +262,9 @@ header img {
padding: 1rem 1.25rem;
border: 0.0625rem solid transparent;
box-shadow: var(--shadow-md);
transition: box-shadow 0.2s ease, transform 0.2s ease;
transition:
box-shadow 0.2s ease,
transform 0.2s ease;
}
.watch-history-card:hover {
@@ -294,7 +295,7 @@ header img {
height: 100%;
border-radius: 0.5rem;
overflow: hidden;
background-color: #0f172a;
background-color: var(--color-surface);
}
.watch-history-card__thumbnailInner img {
@@ -316,7 +317,7 @@ header img {
margin: 0;
font-size: 1.125rem;
font-weight: 600;
color: #ffffff;
color: var(--color-white);
line-height: 1.4;
cursor: pointer;
display: -webkit-box;
@@ -327,13 +328,13 @@ header img {
.watch-history-card__title:hover,
.watch-history-card__title:focus {
color: #60a5fa;
color: var(--color-info);
}
.watch-history-card__created {
margin: 0;
font-size: 0.875rem;
color: #9ca3af;
color: var(--color-muted-alt);
}
.watch-history-card__meta {
@@ -348,7 +349,7 @@ header img {
.watch-history-card__watched {
margin: 0;
font-size: 0.875rem;
color: #d1d5db;
color: var(--color-border-subtle);
}
.watch-history-card__creator {
@@ -366,9 +367,11 @@ header img {
display: flex;
align-items: center;
justify-content: center;
background-color: #1f2937;
background-color: var(--color-panel);
cursor: pointer;
transition: transform 0.2s ease, box-shadow 0.2s ease;
transition:
transform 0.2s ease,
box-shadow 0.2s ease;
}
.watch-history-card__creatorAvatar:hover,
@@ -391,14 +394,14 @@ header img {
margin: 0;
font-size: 0.95rem;
font-weight: 500;
color: #e5e7eb;
color: var(--color-subtle);
text-align: left;
cursor: pointer;
}
.watch-history-card__creatorName:hover,
.watch-history-card__creatorName:focus {
color: #60a5fa;
color: var(--color-info);
outline: none;
}
@@ -418,42 +421,45 @@ header img {
font-size: 0.875rem;
font-weight: 500;
border: 0.0625rem solid transparent;
background-color: #1f2937;
color: #e5e7eb;
background-color: var(--color-panel);
color: var(--color-subtle);
cursor: pointer;
text-decoration: none;
transition: background-color 0.2s ease, color 0.2s ease,
border-color 0.2s ease, box-shadow 0.2s ease;
transition:
background-color 0.2s ease,
color 0.2s ease,
border-color 0.2s ease,
box-shadow 0.2s ease;
}
.watch-history-card__action:hover,
.watch-history-card__action:focus {
background-color: #111827;
color: #ffffff;
border-color: #374151;
background-color: var(--color-surface-alt);
color: var(--color-white);
border-color: var(--color-border);
outline: none;
}
.watch-history-card__action--primary {
background-color: #2563eb;
color: #ffffff;
background-color: var(--color-info-strong);
color: var(--color-white);
}
.watch-history-card__action--primary:hover,
.watch-history-card__action--primary:focus {
background-color: #1d4ed8;
border-color: #1d4ed8;
background-color: var(--color-info-pressed);
border-color: var(--color-info-pressed);
}
.watch-history-card__action--danger {
background-color: #7f1d1d;
color: #ffffff;
background-color: var(--color-critical);
color: var(--color-white);
}
.watch-history-card__action--danger:hover,
.watch-history-card__action--danger:focus {
background-color: #991b1b;
border-color: #991b1b;
background-color: var(--color-critical-strong);
border-color: var(--color-critical-strong);
}
@media (max-width: 1024px) {
@@ -584,7 +590,7 @@ header img {
.video-card .thumbnail-container {
position: relative;
padding-top: 56.25%;
background-color: #0f172a;
background-color: var(--color-surface);
overflow: hidden;
border-top-left-radius: inherit;
border-top-right-radius: inherit;
@@ -656,8 +662,8 @@ header img {
justify-content: stretch;
width: 100vw;
height: 100vh;
background-color: #0f172a;
color: #e2e8f0;
background-color: var(--color-surface);
color: var(--color-subtle-text);
overflow-x: hidden;
overflow-y: auto;
overscroll-behavior: contain;
@@ -704,7 +710,11 @@ header img {
padding: clamp(1.25rem, 2vw, 1.5rem);
border-radius: 1.25rem;
border: 0.0625rem solid rgba(148, 163, 184, 0.28);
background: linear-gradient(145deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.72));
background: linear-gradient(
145deg,
rgba(15, 23, 42, 0.94),
rgba(15, 23, 42, 0.72)
);
box-shadow: 0 1.75rem 3.5rem rgba(8, 11, 30, 0.45);
}
@@ -761,7 +771,10 @@ header img {
box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.08);
color: var(--color-text);
cursor: pointer;
transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
transition:
border-color 0.2s ease,
box-shadow 0.2s ease,
background 0.2s ease;
outline: none;
}
@@ -776,7 +789,11 @@ header img {
#profileModal .profile-card--active {
border-color: rgba(59, 130, 246, 0.55);
background: linear-gradient(160deg, rgba(37, 99, 235, 0.22), rgba(15, 23, 42, 0.78));
background: linear-gradient(
160deg,
rgba(37, 99, 235, 0.22),
rgba(15, 23, 42, 0.78)
);
box-shadow: 0 1.35rem 2.8rem rgba(37, 99, 235, 0.22);
}
@@ -841,14 +858,17 @@ header img {
letter-spacing: 0.18em;
text-transform: uppercase;
text-decoration: none;
transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
transition:
background 0.2s ease,
border-color 0.2s ease,
color 0.2s ease;
}
#profileModal .profile-card__action:hover,
#profileModal .profile-card__action:focus-visible {
background: rgba(59, 130, 246, 0.24);
border-color: rgba(59, 130, 246, 0.6);
color: #ffffff;
color: var(--color-white);
}
#profileModal .profile-card__name {
@@ -862,7 +882,9 @@ header img {
#profileModal .profile-card__npub {
font-size: 0.75rem;
font-family: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
font-family:
"JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Monaco,
Consolas, "Liberation Mono", "Courier New", monospace;
color: rgba(148, 163, 184, 0.85);
word-break: break-all;
}
@@ -884,14 +906,17 @@ header img {
color: rgba(226, 232, 240, 0.85);
text-align: left;
cursor: pointer;
transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
transition:
border-color 0.2s ease,
background 0.2s ease,
color 0.2s ease;
}
#profileModal .profile-switcher__add:hover,
#profileModal .profile-switcher__add:focus-visible {
border-color: rgba(96, 165, 250, 0.65);
background: rgba(59, 130, 246, 0.18);
color: #ffffff;
color: var(--color-white);
outline: none;
}
@@ -979,7 +1004,7 @@ header img {
width: 100%;
min-height: 100%;
max-width: none;
background-color: #0f172a;
background-color: var(--color-surface);
overflow: visible;
box-shadow: none;
animation: fadeIn var(--modal-motion-duration) ease-out;
@@ -1002,7 +1027,7 @@ header img {
#playerModal .player-modal__video video {
width: 100%;
aspect-ratio: 16 / 9;
background-color: #000;
background-color: var(--color-black);
border-radius: 0.75rem;
display: block;
box-shadow: 0 1.125rem 2.75rem rgba(8, 11, 30, 0.55);
@@ -1031,13 +1056,13 @@ header img {
gap: 0.25rem;
font-size: 0.875rem;
line-height: 1.25rem;
color: #9ca3af;
color: var(--color-muted-alt);
white-space: nowrap;
}
.view-count-text {
white-space: nowrap;
color: #6b7280;
color: var(--color-muted-strong);
}
html.modal-open {
@@ -1085,7 +1110,7 @@ body.modal-open #sidebarOverlay {
height: 100%;
display: flex;
flex-direction: column;
background-color: #0f172a;
background-color: var(--color-surface);
animation: fadeIn var(--modal-motion-duration) ease-out;
}
@@ -1143,7 +1168,7 @@ body.modal-open #sidebarOverlay {
.modal-nav .icon-button {
background-color: rgba(30, 41, 59, 0.85);
border: 0.0625rem solid rgba(148, 163, 184, 0.4);
color: #f8fafc;
color: var(--color-text);
box-shadow: none;
}
@@ -1184,7 +1209,7 @@ body.modal-open #sidebarOverlay {
width: 18rem;
max-width: calc(100vw - 2rem);
background: rgba(11, 17, 32, 0.96);
color: #e5e7eb;
color: var(--color-subtle);
border: 1px solid rgba(148, 163, 184, 0.35);
box-shadow: 0 22px 48px -18px rgba(8, 14, 28, 0.7);
-webkit-backdrop-filter: blur(12px);
@@ -1323,7 +1348,7 @@ button:not(.icon-button):focus {
animation: spin 1s linear infinite;
border: 0.125rem solid rgba(96, 165, 250, 0.35);
border-radius: 9999px;
border-top-color: #60a5fa;
border-top-color: var(--color-info);
display: inline-block;
height: 1rem;
width: 1rem;
@@ -1342,7 +1367,7 @@ button:not(.icon-button):focus {
display: inline-flex;
align-items: center;
gap: 0.75rem;
color: #6b7280;
color: var(--color-muted-strong);
font-size: 0.875rem;
font-weight: 500;
letter-spacing: 0.01em;
@@ -1356,7 +1381,7 @@ button:not(.icon-button):focus {
align-items: center;
background-color: rgba(31, 41, 55, 0.9);
border-radius: 0.5rem;
color: #e5e7eb;
color: var(--color-subtle);
display: flex;
gap: 0.75rem;
margin-bottom: 1rem;
@@ -1367,7 +1392,7 @@ button:not(.icon-button):focus {
animation: spin 1s linear infinite;
border: 0.125rem solid rgba(229, 231, 235, 0.35);
border-radius: 9999px;
border-top-color: #f9fafb;
border-top-color: var(--color-page-alt);
height: 1.25rem;
width: 1.25rem;
}
@@ -1451,7 +1476,7 @@ footer a:hover {
#disclaimerModal .modal-footer {
padding: 1.25rem 1.5rem 1.75rem;
background-color: #1a2234;
background-color: var(--color-overlay);
border-top: 0.0625rem solid rgba(255, 255, 255, 0.1);
}
@@ -1537,16 +1562,18 @@ footer a:hover {
width: 2.5rem; /* 40px */
height: 2.5rem; /* 40px */
line-height: 0;
background-color: #3f3f46; /* Gray 700 */
color: #fff;
background-color: var(--color-neutral-700); /* Gray 700 */
color: var(--color-white);
border: none;
border-radius: 9999px;
cursor: pointer;
transition: background-color 0.2s, box-shadow 0.2s;
transition:
background-color 0.2s,
box-shadow 0.2s;
}
.icon-button:hover {
background-color: #52525b; /* Gray 600 */
background-color: var(--color-neutral-600); /* Gray 600 */
}
.icon-button:focus,
@@ -1566,7 +1593,7 @@ footer a:hover {
position: relative;
width: 100%;
padding-top: 56.25%;
background-color: #1e293b;
background-color: var(--color-card);
}
.ratio-16-9 > img {
position: absolute;
@@ -1607,7 +1634,10 @@ footer a:hover {
-webkit-overflow-scrolling: touch;
overscroll-behavior: contain;
scrollbar-gutter: stable both-edges;
transition: width 200ms ease, transform 0.3s ease, box-shadow 0.3s ease;
transition:
width 200ms ease,
transform 0.3s ease,
box-shadow 0.3s ease;
/* Keep below modal stacks so dialogs overlay the drawer. */
z-index: var(--z-sidebar);
box-shadow: none;
@@ -1681,7 +1711,10 @@ footer a:hover {
background: rgba(148, 163, 184, 0.08);
color: inherit;
cursor: pointer;
transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
transition:
background 180ms ease,
color 180ms ease,
border-color 180ms ease;
flex-shrink: 0;
box-sizing: border-box;
}
@@ -1689,7 +1722,7 @@ footer a:hover {
.sidebar-collapse-toggle:hover {
background: rgba(148, 163, 184, 0.18);
border-color: rgba(148, 163, 184, 0.35);
color: #f8fafc;
color: var(--color-text);
}
.sidebar-collapse-toggle:focus-visible {
@@ -1723,14 +1756,17 @@ footer a:hover {
font-weight: 600;
color: rgba(226, 232, 240, 0.94);
text-decoration: none;
transition: background 160ms ease, color 160ms ease, transform 160ms ease;
transition:
background 160ms ease,
color 160ms ease,
transform 160ms ease;
width: 100%;
box-sizing: border-box;
}
.sidebar-nav-link:hover {
background: rgba(148, 163, 184, 0.18);
color: #f8fafc;
color: var(--color-text);
}
.sidebar-nav-link:focus-visible {
@@ -1779,7 +1815,10 @@ footer a:hover {
font-size: 0.9rem;
font-weight: 600;
cursor: pointer;
transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
transition:
background 160ms ease,
border-color 160ms ease,
color 160ms ease;
box-sizing: border-box;
flex-shrink: 0;
}
@@ -1787,7 +1826,7 @@ footer a:hover {
.sidebar-dropup-trigger:hover {
background: rgba(51, 65, 85, 0.95);
border-color: rgba(148, 163, 184, 0.32);
color: #f8fafc;
color: var(--color-text);
}
.sidebar-dropup-trigger:focus-visible {
@@ -1826,7 +1865,10 @@ footer a:hover {
visibility: hidden;
pointer-events: none;
transform: translateY(0.5rem);
transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
transition:
opacity 160ms ease,
transform 160ms ease,
visibility 160ms ease;
z-index: 5;
}
@@ -1917,19 +1959,34 @@ body.sidebar-open #sidebarOverlay {
#app {
box-sizing: border-box;
transition: margin-left 200ms ease, width 200ms ease, max-width 200ms ease;
transition:
margin-left 200ms ease,
width 200ms ease,
max-width 200ms ease;
}
#app[data-sidebar-state="collapsed"] {
margin-left: calc(var(--sidebar-width-collapsed) + var(--sidebar-content-gap));
width: calc(100vw - var(--sidebar-width-collapsed) - var(--sidebar-content-gap));
max-width: calc(100vw - var(--sidebar-width-collapsed) - var(--sidebar-content-gap));
margin-left: calc(
var(--sidebar-width-collapsed) + var(--sidebar-content-gap)
);
width: calc(
100vw - var(--sidebar-width-collapsed) - var(--sidebar-content-gap)
);
max-width: calc(
100vw - var(--sidebar-width-collapsed) - var(--sidebar-content-gap)
);
}
#app[data-sidebar-state="expanded"] {
margin-left: calc(var(--sidebar-width-expanded) + var(--sidebar-content-gap));
width: calc(100vw - var(--sidebar-width-expanded) - var(--sidebar-content-gap));
max-width: calc(100vw - var(--sidebar-width-expanded) - var(--sidebar-content-gap));
margin-left: calc(
var(--sidebar-width-expanded) + var(--sidebar-content-gap)
);
width: calc(
100vw - var(--sidebar-width-expanded) - var(--sidebar-content-gap)
);
max-width: calc(
100vw - var(--sidebar-width-expanded) - var(--sidebar-content-gap)
);
}
body.sidebar-collapsed,
@@ -2032,28 +2089,31 @@ body.sidebar-open #sidebarOverlay {
.edit-field-button {
align-items: center;
background-color: #1f2937;
background-color: var(--color-panel);
border-radius: 0.5rem;
color: #e2e8f0;
color: var(--color-subtle-text);
display: inline-flex;
font-size: 0.75rem;
font-weight: 600;
justify-content: center;
padding: 0.5rem 0.85rem;
transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
transition:
background-color 0.2s ease,
color 0.2s ease,
transform 0.2s ease;
}
.edit-field-button:hover,
.edit-field-button:focus {
background-color: #334155;
color: #f8fafc;
background-color: var(--color-panel-hover);
color: var(--color-text);
transform: translateY(-0.0625rem);
}
.locked-input {
background-color: rgba(31, 41, 55, 0.75) !important;
border-color: rgba(55, 65, 81, 0.9) !important;
color: #94a3b8 !important;
color: var(--color-muted) !important;
cursor: default;
}
+3 -1
View File
@@ -1 +1,3 @@
*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.\!container{width:100%!important}.container{width:100%}@media (min-width:640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@mediLine truncated
:root{--color-page:#fff;--color-page-alt:#f9fafb;--color-surface:#0f172a;--color-surface-alt:#111827;--color-bg:var(--color-surface);--color-card:#1e293b;--color-card-private:#3b1d74;--color-card-critical:#3f0b13;--color-panel:#1f2937;--color-panel-hover:#334155;--color-border:#374151;--color-border-subtle:#d1d5db;--color-primary:#fe0032;--color-secondary:#ff93a5;--color-info:#60a5fa;--color-info-strong:#2563eb;--color-info-pressed:#1d4ed8;--color-muted-strong:#6b7280;--color-text:#f8fafc;--color-text-strong:#0f172a;--color-muted:#94a3b8;--color-muted-alt:#9ca3af;--color-subtle-text:#e2e8f0;--color-subtle:#e5e7eb;--color-critical:#7f1d1d;--color-critical-strong:#991b1b;--color-neutral-700:#3f3f46;--color-neutral-600:#52525b;--color-white:#fff;--color-black:#000;--color-overlay:#1a2234;--space-2xs:0.25rem;--space-xs:0.5rem;--space-sm:0.75rem;--space-md:1rem;--space-lg:1.5rem;--space-xl:2rem;--space-2xl:3rem;--radius-sm:0.25rem;--radius-md:0.5rem;--radius-lg:0.75rem;--radius-xl:1rem;--radius-full:9999px;--shadow-sm:0 0.0625rem 0.125rem 0 rgb(0 0 0/5%);--shadow-md:0 0.25rem 0.375rem -0.0625rem rgba(0,0,0,.1);--shadow-lg:0 0.625rem 0.9375rem -0.1875rem rgba(0,0,0,.1);--shadow-modal:0 1.25rem 2.5rem -0.375rem rgba(15,23,42,.55);--font-family-sans:"Inter","Segoe UI",system-ui,-apple-system,sans-serif;--font-family-mono:"Fira Code","SFMono-Regular",ui-monospace,monospace;--font-size-xs:0.75rem;--font-size-sm:0.875rem;--font-size-base:1rem;--font-size-lg:1.125rem;--font-size-xl:1.5rem;--font-size-2xl:2rem;--line-height-tight:1.1;--line-height-snug:1.25;--line-height-base:1.5;--line-height-relaxed:1.75;--motion-duration-fast:120ms;--motion-duration-base:160ms;--motion-duration-slow:280ms;--motion-ease-out:cubic-bezier(0.16,1,0.3,1);--motion-ease-in-out:cubic-bezier(0.4,0,0.2,1);--modal-motion-duration:var(--motion-duration-base)}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }
/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:var(--font-family-sans);font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--font-family-mono);font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.\!container{width:100%!important}.container{width:100%}@media (min-width:640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width:1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width:1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width:1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.\!visible{visibility:visible!important}.visible{visibility:visible}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.bottom-1{bottom:.25rem}.bottom-4{bottom:1rem}.bottom-full{bottom:100%}.left-4{left:1rem}.right-0{right:0}.right-2{right:.5rem}.right-3{right:.75rem}.right-4{right:1rem}.top-0{top:0}.top-12{top:3rem}.top-14{top:3.5rem}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\[60\]{z-index:60}.m-auto{margin:auto}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.my-0{margin-top:0;margin-bottom:0}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-6{margin-top:1.5rem;margin-bottom:1.5rem}.-ml-2{margin-left:-.5rem}.mb-0{margin-bottom:0}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-auto{margin-left:auto}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.box-border{box-sizing:border-box}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.aspect-video{aspect-ratio:16/9}.h-1{height:.25rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-16{height:4rem}.h-2{height:.5rem}.h-4{height:1rem}.h-48{height:12rem}Line truncated
+2
View File
@@ -1,3 +1,5 @@
@import "./tokens.css";
@tailwind base;
@tailwind components;
@tailwind utilities;
+78
View File
@@ -0,0 +1,78 @@
:root {
/* Color tokens */
--color-page: rgb(255 255 255);
--color-page-alt: rgb(249 250 251);
--color-surface: rgb(15 23 42);
--color-surface-alt: rgb(17 24 39);
--color-bg: var(--color-surface);
--color-card: rgb(30 41 59);
--color-card-private: rgb(59 29 116);
--color-card-critical: rgb(63 11 19);
--color-panel: rgb(31 41 55);
--color-panel-hover: rgb(51 65 85);
--color-border: rgb(55 65 81);
--color-border-subtle: rgb(209 213 219);
--color-primary: rgb(254 0 50);
--color-secondary: rgb(255 147 165);
--color-info: rgb(96 165 250);
--color-info-strong: rgb(37 99 235);
--color-info-pressed: rgb(29 78 216);
--color-muted-strong: rgb(107 114 128);
--color-text: rgb(248 250 252);
--color-text-strong: rgb(15 23 42);
--color-muted: rgb(148 163 184);
--color-muted-alt: rgb(156 163 175);
--color-subtle-text: rgb(226 232 240);
--color-subtle: rgb(229 231 235);
--color-critical: rgb(127 29 29);
--color-critical-strong: rgb(153 27 27);
--color-neutral-700: rgb(63 63 70);
--color-neutral-600: rgb(82 82 91);
--color-white: rgb(255 255 255);
--color-black: rgb(0 0 0);
--color-overlay: rgb(26 34 52);
/* Spacing scale */
--space-2xs: 0.25rem;
--space-xs: 0.5rem;
--space-sm: 0.75rem;
--space-md: 1rem;
--space-lg: 1.5rem;
--space-xl: 2rem;
--space-2xl: 3rem;
/* Border radii */
--radius-sm: 0.25rem;
--radius-md: 0.5rem;
--radius-lg: 0.75rem;
--radius-xl: 1rem;
--radius-full: 9999px;
/* Shadows */
--shadow-sm: 0 0.0625rem 0.125rem 0 rgb(0 0 0 / 5%);
--shadow-md: 0 0.25rem 0.375rem -0.0625rem rgb(0 0 0 / 10%);
--shadow-lg: 0 0.625rem 0.9375rem -0.1875rem rgb(0 0 0 / 10%);
--shadow-modal: 0 1.25rem 2.5rem -0.375rem rgb(15 23 42 / 55%);
/* Typography */
--font-family-sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
--font-family-mono: "Fira Code", "SFMono-Regular", ui-monospace, monospace;
--font-size-xs: 0.75rem;
--font-size-sm: 0.875rem;
--font-size-base: 1rem;
--font-size-lg: 1.125rem;
--font-size-xl: 1.5rem;
--font-size-2xl: 2rem;
--line-height-tight: 1.1;
--line-height-snug: 1.25;
--line-height-base: 1.5;
--line-height-relaxed: 1.75;
/* Motion */
--motion-duration-fast: 120ms;
--motion-duration-base: 160ms;
--motion-duration-slow: 280ms;
--motion-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
--motion-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
--modal-motion-duration: var(--motion-duration-base);
}
+177
View File
@@ -0,0 +1,177 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Bitvid Tailwind Kitchen Sink</title>
<link rel="stylesheet" href="../css/tailwind.generated.css" />
</head>
<body class="bg-page font-sans text-text-strong">
<div class="min-h-screen bg-page-alt">
<header class="bg-surface text-text shadow-modal">
<div
class="mx-auto flex max-w-6xl items-center justify-between px-md py-sm"
>
<h1 class="text-2xl font-semibold">Bitvid UI Kitchen Sink</h1>
<button
class="rounded-lg bg-primary px-sm py-2 text-white shadow-md transition duration-fast ease-out hover:bg-secondary focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary"
>
Primary Action
</button>
</div>
</header>
<main class="mx-auto flex max-w-6xl flex-col gap-lg px-md py-lg">
<section class="space-y-md">
<h2 class="text-xl font-semibold text-text-strong">Buttons</h2>
<div class="flex flex-wrap gap-sm">
<button
class="rounded-md bg-primary px-sm py-2 text-white shadow-md transition duration-fast ease-out hover:bg-secondary"
>
Primary
</button>
<button
class="rounded-md bg-info px-sm py-2 text-surface shadow-sm transition duration-fast ease-out hover:bg-info-strong"
>
Informational
</button>
<button
class="rounded-md bg-critical px-sm py-2 text-white shadow-sm transition duration-fast ease-out hover:bg-critical-strong"
>
Destructive
</button>
<button
class="rounded-md border border-border-subtle px-sm py-2 text-text-muted shadow-none transition duration-fast ease-out hover:bg-panel-hover hover:text-text"
>
Ghost
</button>
</div>
</section>
<section class="space-y-md">
<h2 class="text-xl font-semibold text-text-strong">Cards</h2>
<div class="grid gap-md md:grid-cols-3">
<article class="rounded-lg bg-card p-md text-text shadow-lg">
<h3 class="text-lg font-semibold">Default Card</h3>
<p class="mt-xs text-text-muted">
Uses
<code class="font-mono text-sm text-info">bg-card</code> and
tokenized shadows.
</p>
<button
class="mt-sm rounded-md bg-info px-sm py-2 text-surface shadow-sm transition duration-base ease-in-out hover:bg-info-strong"
>
Watch Now
</button>
</article>
<article
class="rounded-lg bg-card-private p-md text-text shadow-lg"
>
<h3 class="text-lg font-semibold">Private Card</h3>
<p class="mt-xs text-text-muted">
Emphasizes restricted content with
<code class="font-mono text-sm text-info">bg-card-private</code
>.
</p>
</article>
<article
class="rounded-lg bg-card-critical p-md text-text shadow-lg"
>
<h3 class="text-lg font-semibold">Critical Card</h3>
<p class="mt-xs text-text-muted">
Use for outage or abuse states.
</p>
</article>
</div>
</section>
<section class="space-y-md">
<h2 class="text-xl font-semibold text-text-strong">Form Inputs</h2>
<form class="grid gap-md md:grid-cols-2">
<label class="flex flex-col gap-xs">
<span class="text-sm font-medium text-text-muted"
>Display Name</span
>
<input
class="rounded-md border border-border-subtle bg-white px-sm py-xs text-text-strong shadow-sm focus:border-info focus:ring-2 focus:ring-info-strong"
type="text"
placeholder="Satoshi Stack"
/>
</label>
<label class="flex flex-col gap-xs">
<span class="text-sm font-medium text-text-muted">Video URL</span>
<input
class="rounded-md border border-border-subtle bg-white px-sm py-xs text-text-strong shadow-sm focus:border-info focus:ring-2 focus:ring-info-strong"
type="url"
placeholder="https://example.com/video.mp4"
/>
</label>
<label class="flex flex-col gap-xs md:col-span-2">
<span class="text-sm font-medium text-text-muted"
>Description</span
>
<textarea
class="rounded-md border border-border-subtle bg-white px-sm py-xs text-text-strong shadow-sm focus:border-info focus:ring-2 focus:ring-info-strong"
rows="3"
placeholder="Describe what viewers should expect..."
></textarea>
</label>
</form>
</section>
<section class="space-y-md">
<h2 class="text-xl font-semibold text-text-strong">Modal Preview</h2>
<div
class="relative overflow-hidden rounded-xl bg-overlay p-lg text-text shadow-modal"
>
<div class="space-y-sm">
<h3 class="text-lg font-semibold">Upload Video</h3>
<p class="text-text-muted">
Motion tokens control the fade via
<code class="font-mono text-sm text-info">duration-base</code>
and
<code class="font-mono text-sm text-info">ease-out</code>
utilities.
</p>
</div>
<div class="mt-md flex flex-col gap-sm">
<input
class="rounded-md border border-border-subtle bg-white px-sm py-xs text-text-strong focus:border-info focus:ring-2 focus:ring-info"
type="text"
placeholder="Magnet URI"
/>
<div class="flex justify-end gap-sm">
<button
class="rounded-md border border-border px-sm py-2 text-text-muted transition duration-fast ease-out hover:text-text"
>
Cancel
</button>
<button
class="rounded-md bg-primary px-sm py-2 text-white shadow-md transition duration-fast ease-out hover:bg-secondary"
>
Publish
</button>
</div>
</div>
</div>
</section>
<section class="space-y-md">
<h2 class="text-xl font-semibold text-text-strong">
Typography Scale
</h2>
<div class="space-y-xs">
<p class="text-2xl font-semibold">Display / 2xl</p>
<p class="text-xl font-semibold">Headline / xl</p>
<p class="text-lg font-medium">Title / lg</p>
<p class="text-base">Body / base</p>
<p class="text-sm text-text-muted">Caption / sm</p>
<p class="text-xs uppercase tracking-wide text-text-muted">
Meta / xs
</p>
</div>
</section>
</main>
</div>
</body>
</html>
+1189
View File
File diff suppressed because it is too large. Load diff
+10 -3
View File
@@ -3,12 +3,19 @@
"private": true,
"version": "1.0.0",
"scripts": {
"build:css": "npx tailwindcss -c tailwind.config.cjs -i css/tailwind.source.css -o css/tailwind.generated.css --minify"
"build:css": "npx tailwindcss -c tailwind.config.cjs -i css/tailwind.source.css -o css/tailwind.generated.css --minify",
"format": "prettier --cache --write css/style.css css/tailwind.source.css css/tokens.css \"docs/**/*.html\" tailwind.config.cjs README.md",
"lint:css": "stylelint css/tailwind.source.css css/tokens.css",
"check:css": "npm run build:css && git diff --exit-code -- css/tailwind.generated.css"
},
"devDependencies": {
"autoprefixer": "^10.4.19",
"jsdom": "^24.0.0",
"postcss": "^8.4.41",
"tailwindcss": "^3.4.13",
"jsdom": "^24.0.0"
"prettier": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.6.5",
"stylelint": "^16.8.0",
"stylelint-config-standard": "^36.0.1",
"tailwindcss": "^3.4.13"
}
}
+5
View File
@@ -0,0 +1,5 @@
module.exports = {
plugins: [require.resolve("prettier-plugin-tailwindcss")],
singleQuote: false,
trailingComma: "none"
};
+18
View File
@@ -0,0 +1,18 @@
module.exports = {
ignoreFiles: ['css/tailwind.generated.css', 'css/style.css'],
rules: {
'at-rule-no-unknown': [true, { ignoreAtRules: ['tailwind', 'layer', 'apply'] }],
'import-notation': 'string',
'color-no-hex': true,
'declaration-property-value-allowed-list': {
color: ['var\(--.*\)', 'inherit', 'currentColor'],
'background-color': ['var\(--.*\)', 'transparent', 'inherit'],
background: ['var\(--.*\)', 'none', 'transparent'],
'border-color': ['var\(--.*\)', 'transparent', 'inherit', 'currentColor'],
'outline-color': ['var\(--.*\)', 'transparent', 'inherit', 'currentColor'],
fill: ['var\(--.*\)', 'none', 'currentColor', 'inherit'],
stroke: ['var\(--.*\)', 'none', 'currentColor', 'inherit'],
'box-shadow': ['var\(--.*\)', 'none']
}
}
};
+106 -6
View File
@@ -1,13 +1,113 @@
module.exports = {
content: [
'./index.html',
'./blog.html',
'./components/**/*.html',
'./views/**/*.html',
'./js/**/*.js'
"./index.html",
"./blog.html",
"./components/**/*.html",
"./views/**/*.html",
"./js/**/*.js"
],
theme: {
extend: {}
extend: {
colors: {
page: "var(--color-page)",
"page-alt": "var(--color-page-alt)",
surface: "var(--color-surface)",
"surface-alt": "var(--color-surface-alt)",
overlay: "var(--color-overlay)",
primary: "var(--color-primary)",
secondary: "var(--color-secondary)",
panel: {
DEFAULT: "var(--color-panel)",
hover: "var(--color-panel-hover)"
},
card: {
DEFAULT: "var(--color-card)",
private: "var(--color-card-private)",
critical: "var(--color-card-critical)"
},
border: {
DEFAULT: "var(--color-border)",
subtle: "var(--color-border-subtle)"
},
text: {
DEFAULT: "var(--color-text)",
strong: "var(--color-text-strong)",
muted: "var(--color-muted)"
},
muted: {
DEFAULT: "var(--color-muted)",
strong: "var(--color-muted-strong)",
alt: "var(--color-muted-alt)"
},
info: {
DEFAULT: "var(--color-info)",
strong: "var(--color-info-strong)",
pressed: "var(--color-info-pressed)"
},
critical: {
DEFAULT: "var(--color-critical)",
strong: "var(--color-critical-strong)"
},
neutral: {
600: "var(--color-neutral-600)",
700: "var(--color-neutral-700)"
},
white: "var(--color-white)",
black: "var(--color-black)"
},
borderRadius: {
sm: "var(--radius-sm)",
md: "var(--radius-md)",
lg: "var(--radius-lg)",
xl: "var(--radius-xl)",
full: "var(--radius-full)"
},
boxShadow: {
sm: "var(--shadow-sm)",
md: "var(--shadow-md)",
lg: "var(--shadow-lg)",
modal: "var(--shadow-modal)"
},
spacing: {
"2xs": "var(--space-2xs)",
xs: "var(--space-xs)",
sm: "var(--space-sm)",
md: "var(--space-md)",
lg: "var(--space-lg)",
xl: "var(--space-xl)",
"2xl": "var(--space-2xl)"
},
fontFamily: {
sans: ["var(--font-family-sans)"],
mono: ["var(--font-family-mono)"]
},
fontSize: {
xs: ["var(--font-size-xs)", { lineHeight: "var(--line-height-tight)" }],
sm: ["var(--font-size-sm)", { lineHeight: "var(--line-height-snug)" }],
base: [
"var(--font-size-base)",
{ lineHeight: "var(--line-height-base)" }
],
lg: ["var(--font-size-lg)", { lineHeight: "var(--line-height-base)" }],
xl: [
"var(--font-size-xl)",
{ lineHeight: "var(--line-height-relaxed)" }
],
"2xl": [
"var(--font-size-2xl)",
{ lineHeight: "var(--line-height-relaxed)" }
]
},
transitionDuration: {
fast: "var(--motion-duration-fast)",
base: "var(--motion-duration-base)",
slow: "var(--motion-duration-slow)"
},
transitionTimingFunction: {
"ease-out": "var(--motion-ease-out)",
"ease-in-out": "var(--motion-ease-in-out)"
}
}
},
plugins: []
};