feat: bump default watermark.size and add theme.watermark.margin (#97) - #98
Merged
Merged
Conversation
Bumps the default theme.watermark.size from 0.024 to 0.04 (~1.7x, per side-by-side rendering rounds in the issue) — the old default read faint even for a short text tag, and worse once an image watermark could be drawn at it. theme.watermark.imageSize inherits the same bump since it falls back to size by default. Also lifts the watermark's corner margin out of a pair of hardcoded 0.04 literals (theme.width * 0.04 horizontally, theme.height * 0.96 — i.e. the same 0.04 — vertically) into theme.watermark.margin, applied to both axes. Defaults to 0.04, matching the previous hardcoded behavior exactly, but now overridable without patching the render function. Closes #97.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #97.
theme.watermark.sizegoes from0.024to0.04— about 1.7x, matching the sweet spot found across several rounds of side-by-sidenew-layout renders in the issue. This affects both the text watermark and, by inheriting the same fallback,theme.watermark.imageSizewhen left unset.0.04literals (theme.width * 0.04for the horizontal margin,theme.height * 0.96— i.e. the same0.04from the bottom — for the vertical one). Both now come from a singletheme.watermark.margin(default0.04, so nothing moves unless you opt in), applied to both axes since it's the same "distance from the corner" concept either way.Test plan
npm run ci(biome)npm run typechecknpm run test(873 tests, all green; new margin regression test verified red against the pre-fix code —Unknown theme property "theme.watermark.margin"— then green after)npm run buildnpm run check:build(27 checks passed)