Skip to content

fix(svg): responsive fit: shrink + Pennington.Beck docs rewrite#10

Merged
phil-scott-78 merged 2 commits into
mainfrom
fit-shrink-responsive
Jul 10, 2026
Merged

fix(svg): responsive fit: shrink + Pennington.Beck docs rewrite#10
phil-scott-78 merged 2 commits into
mainfrom
fit-shrink-responsive

Conversation

@phil-scott-78

Copy link
Copy Markdown
Contributor

Summary

  • fit: shrink (the default) now emits inline max-width:100% instead of a natural-pixel-width cap, so diagrams scale down inside narrow containers; fit: scroll keeps the pixel cap so the host container scrolls instead
  • Adds a FitModeControlsInlineMaxWidth smoke test covering both modes; goldens and oracle renders regenerated for the inline-style change
  • Rewrites the Pennington guide around the Pennington.Beck package (AddPenningtonBeck() one-liner replaces the hand-rolled ICodeBlockPreprocessor walkthrough), documents the fence flags (static, scrub, style=<name>), and adds the missing meta.style row to the YAML schema reference and llms.md

Test plan

  • dotnet test tests/Beck.Tests/Beck.Tests.csproj — 420/420 passing

The inline style capped the SVG at its natural pixel width, which kept it
from scaling down inside narrow containers. Shrink mode now emits
`max-width:100%` (the width attribute still caps it at natural size in wide
containers); `fit: scroll` keeps the pixel cap so the host container scrolls
instead. Adds a smoke test for both modes and regenerates the golden and
oracle SVGs.
The hand-rolled `ICodeBlockPreprocessor` walkthrough is replaced by the
one-liner `AddPenningtonBeck()` registration, with new sections on the fence
flags (`static`, `scrub`, `style=<name>`) and the three scopes for picking a
style. Adds the missing `meta.style` row to the YAML schema reference and
llms.md.
@phil-scott-78
phil-scott-78 merged commit 43981eb into main Jul 10, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant