Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/server/src/environmentTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ const THEME_FILE_SUFFIX = ".json";

const MAX_THEME_FILES = 32;
/** Shared with publishing so it cannot accept files the watcher skips. */
export const MAX_THEME_FILE_BYTES = 32 * 1024;
const MAX_THEME_TOTAL_BYTES = 192 * 1024;
export const MAX_THEME_FILE_BYTES = 80 * 1024;
const MAX_THEME_TOTAL_BYTES = 480 * 1024;

interface PublishedThemes {
readonly seq: number;
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ const EnvironmentThemeColors = Schema.Record(
TrimmedNonEmptyString.check(Schema.isMaxLength(64)),
);

export const THEME_CSS_MAX_LENGTH = 20_000;
export const THEME_CSS_MAX_LENGTH = 50_000;

const environmentThemeFields = {
version: Schema.optional(Schema.Literal(1)),
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/src/themeCss.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export const THEME_GUIDE = [
"",
"CSS: `css` applies after the app's styles. Use `.dark` or `:root:not(.dark)` for one appearance.",
"It cannot load files: no @import, no image-set(), and url() only with data: or #id.",
"A background image must be embedded as a data: address. `css` holds 20,000 characters, so keep the image near 10 KB.",
"A background image must be embedded as a data: address. `css` holds 50,000 characters, so keep the image near 30 KB.",
"The app's own rules can be more specific. If a rule has no effect, add !important.",
"It cannot reach the terminal text, the file tree, or diff internals. Use color roles for those.",
"Native scrollbars take `::-webkit-scrollbar` and `::-webkit-scrollbar-thumb`.",
Expand Down
Loading