Skip to content

Commit a8523e9

Browse files
committed
style: enhance theme variables with new integration and layout properties
1 parent 5248334 commit a8523e9

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

src/theme/variables.css

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
--memori-primary: var(--memori-primary-color, oklch(48% 0.19 297deg));
3232
--memori-secondary: var(--memori-secondary-color, oklch(70% 0.15 200deg));
3333

34+
/* RGB triple for use in rgb(var(--memori-primary-rgb)) — PDF export, share, etc. */
35+
--memori-primary-rgb: 130, 70, 175;
36+
3437
/* ============================================
3538
DERIVED PRIMARY COLORS (Auto-calculated)
3639
============================================ */
@@ -69,6 +72,18 @@
6972
--memori-skeleton-base: color-mix(in oklch, var(--memori-primary), white 85%);
7073
--memori-skeleton-highlight: color-mix(in oklch, var(--memori-primary), white 75%);
7174

75+
/* ============================================
76+
INTEGRATION / LAYOUT
77+
============================================ */
78+
79+
/* Optional override for integration text; set on .memori-widget or parent. */
80+
--memori-integration-text-color: var(--memori-text-color);
81+
82+
/* Surface contrast for primary-subtle, skeleton, share button (light = white, dark = black). */
83+
--memori-surface-contrast: white;
84+
--memori-surface-contrast-inverse: black;
85+
--memori-layout-max-width: 1280px;
86+
7287
/* ============================================
7388
STATIC COLORS (Don't change with theme)
7489
============================================ */
@@ -144,6 +159,10 @@
144159
/* Border size */
145160
--memori-border: 1px; /* Default border width for borders */
146161

162+
/* Button (padding and shadow for ExportHistoryButton, PoweredBy, etc.) */
163+
--memori-button-padding: 0.5rem 1.5rem;
164+
--memori-button-box-shadow: var(--memori-shadow-sm);
165+
147166
/* Modal sizes */
148167
--memori-modal-size-sm: 400px;
149168
--memori-modal-size-md: 600px;
@@ -160,6 +179,9 @@
160179
--memori-shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 25%);
161180
--memori-noise: 0; /* Noise/grain effect intensity (0 = no noise) */
162181

182+
/* Backdrop blur (e.g. MediaItemWidget) */
183+
--memori-blur-background: 10px;
184+
163185
/* Motion - for hover/focus and micro-interactions (under 300ms) */
164186
--memori-motion-duration-fast: 150ms;
165187
--memori-motion-duration-normal: 200ms;
@@ -168,13 +190,28 @@
168190
--memori-motion-ease-in-out: ease-in-out;
169191
--memori-motion-ease-out: cubic-bezier(0.33, 1, 0.68, 1);
170192
--memori-motion-ease-in: cubic-bezier(0.32, 0.72, 0, 1);
193+
194+
/* Content preview modal (optional; components can override) */
195+
--memori-content-preview-bg: var(--memori-secondary-background);
196+
--memori-content-preview-border: var(--memori-border-color);
197+
--memori-content-preview-title: var(--memori-text-color);
198+
--memori-content-preview-close-bg: transparent;
199+
--memori-content-preview-close-hover: oklch(0% 0 0deg / 8%);
200+
--memori-content-preview-image-bg: oklch(0% 0 0deg / 4%);
201+
--memori-content-preview-snippet-border: var(--memori-border-color);
202+
--memori-content-preview-snippet-bg: var(--memori-main-background);
203+
--memori-content-preview-snippet-text: var(--memori-text-color);
171204
}
172205

173206
/* Dark theme */
174207
[data-theme='dark'],
175208
:root.dark {
176209
color-scheme: dark;
177210

211+
/* Integration / layout - inverted for dark mode */
212+
--memori-surface-contrast: black;
213+
--memori-surface-contrast-inverse: white;
214+
178215
/* Base colors - inverted for dark mode */
179216
--memori-main-background: oklch(27.4% 0.022 109.7deg);
180217
--memori-secondary-background: oklch(21.6% 0.015 109.7deg);
@@ -198,6 +235,8 @@
198235
/*
199236
* Dynamic primary override (copy into your selector when setting --memori-primary in JS)
200237
* Re-defining these in the same rule ensures hover/subtle/focus/skeleton use your primary.
238+
* When using RGB (e.g. for PDF/share), set --memori-primary-rgb to "R, G, B" and use
239+
* --memori-primary-color: rgb(var(--memori-primary-rgb)); (no second argument).
201240
*
202241
* your-selector {
203242
* --memori-primary-color: <your-color>;

0 commit comments

Comments
 (0)