Repository navigation
docs: Canvas Candy full class catalogue — gap analysis - #32
Merged
Merged
Conversation
#19 was sized L because most of the cost was *research*: read the upstream plugin, enumerate every cc-* class, compare against our baseline, decide which are gaps worth closing. This commit does that research as a single doc and proposes a sub-issue split that turns the residual code work into S / XS chunks. Source for the upstream catalogue: github.com/TfTHacker/obsidian-canvas-candy — specifically 04 List of Decorations.md, the canonical class index. Findings Already supported (28 classes): all shapes, all card fill, all borders, all 8 documented gradient degrees plus any integer via our regex, all rotation classes plus any integer via our regex, text alignment. Net new gaps (3 classes worth implementing): cc-shape-parallelogram — alias for -left, XS direct port cc-image-cover — S direct port, reuses existing backgroundStyle:'cover' Skia path cc-image-clip — M new render primitive, needs card-shape clip plumbed into SkiaImageRenderer Deliberate-skip candidates (9 classes): cc-header / cc-footer / cc-label-{left,right} and their -noborder variants. These are upstream's CSS-class mechanism for zone-style callouts; we already expose the same zones via block syntax in extensions/callouts.ts. Supporting both mechanisms doubles the maintenance surface for the same visual effect. Doc recommends documenting the mismatch and optionally adding an import-time conversion pass rather than parallel support — open question for the maintainer. Where we're more permissive than upstream (no work needed): gradient deg — upstream documents 8 multiples of 45°; we accept any integer via regex card rotation — upstream documents only -45; we accept any int text rotation — upstream documents 8 multiples of 45°; we accept any int plus an undocumented trailing 'l' variant Open questions enumerated at the end of the doc: 1. Confirm skip on 9 callout-zone CSS classes 2. Verify cc-shape-parallelogram default direction (-left vs -right) 3. Priority order for the 3 feature gaps 4. File sub-issues now or wait for consumer demand? Proposed sub-issue split (post-review): feat(candy): cc-shape-parallelogram alias XS feat(candy): cc-image-cover for text / file nodes S feat(candy): cc-image-clip (card-shape image clipping) M docs(candy): document skipped callout-zone classes XS Total code work is closer to S after split — most of #19's original L sizing was this research, now resolved. No code changes. Library checks pass on this branch (38/38 tests, typecheck clean, lint exit 0). Refs: #19 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
LeslieOA
force-pushed
the
docs/canvas-candy-catalogue
branch
from
October 4, 2026 20:09
9a43e51 to
a8c0604
Compare
Review of #32 before landing. The catalogue had upstream's class list right but misfiled eleven of the classes: - cc-header, cc-footer, cc-label-left and cc-label-right, with their -noborder variants, were listed as a CSS-class mechanism we skip. They are callouts (>[!cc-header]), which callouts.ts has supported all along, -noborder included. - cc-image-cover and cc-image-clip were listed as cssclasses, with a card-outline clip as the effect. They are callouts that lay an image over the card; "clip" is an invalid object-fit value, so it stretches. They are a real gap: the raw marker shows in the card today. - cc-shape-parallelogram was listed as a missing alias. Upstream's CSS defines only -left and -right, both of which we support. It also adds the sticker convention (file names containing -cc-image), which upstream's list leaves out, and drops the references to #29, which was closed; the conformance tests landed as #67, #68 and #82. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Adds
docs/canvas-candy-catalogue.md: every decoration upstream Canvas Candy defines, marked supported or gap. It is the research part of #19, checked against upstream's CSS (.obsidian/snippets/canvas-candy.css), not only its class list.Findings
-nobordervariants (callouts.ts, tested in test(renderer): Canvas Candy callout-zone conformance (#16, slice 3) #82).>[!cc-image-cover]and>[!cc-image-clip].callouts.tsdoesn't know them, so the raw marker shows in the card.-cc-imagelose their border, background and label upstream. We draw them as ordinary file nodes.cc-shape-parallelogram, unsuffixed, is in upstream's list but has no CSS rule. Nothing to port.Corrected in review
The first version of this catalogue misfiled eleven classes: it listed the header, footer and label callouts as a CSS-class mechanism to skip, the image callouts as cssclasses that clip to the card outline, and the unsuffixed parallelogram as a missing alias. The rewrite is in the second commit.
Verification
Docs only.
npm test,npm run typecheckandnpm run lintpass.Refs #19
🤖 Generated with Claude Code