Skip to content

feat: add BlockVariant for named widget block styles#95

Merged
leoafarias merged 4 commits into
mainfrom
feat/block-variant-styles
Jul 10, 2026
Merged

feat: add BlockVariant for named widget block styles#95
leoafarias merged 4 commits into
mainfrom
feat/block-variant-styles

Conversation

@leoafarias

Copy link
Copy Markdown
Member

Adds BlockVariant, an opt-in Mix context selector that lets Dart stylesheets target a named WidgetBlock (e.g. @webview, @chart) without adding style fields to Markdown, block arguments, or frontmatter. Each widget block now resolves its container style inside an internal BlockVariantScope, so a matching variant affects both the rendered container and the child's calculated size together. Existing NamedVariant rules and default image/gist spacing are unaffected unless a stylesheet explicitly adds a BlockVariant rule. Includes docs updates for deck-options and markdown-syntax, a CHANGELOG entry, and new widget/rendering tests covering matching, sibling isolation, and layout sizing.

Adds an opt-in Mix context selector so Dart stylesheets can target a
named WidgetBlock (e.g. @webview, @Chart) without adding style fields
to Markdown, block arguments, or frontmatter.
@docs-page

docs-page Bot commented Jul 10, 2026

Copy link
Copy Markdown

To preview the documentation for this pull request, visit the following URL:

docs.page/btwld/superdeck~95

Documentation is deployed and generated using docs.page

@github-actions

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit da2d9f7):

https://superdeck-dev--pr95-feat-block-variant-s-h1rvy6c7.web.app

(expires Sun, 09 Aug 2026 15:06:35 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: bd68fc230762285849207e7e120aaf87cd4ca2f9

Adds a default BlockVariant('webview') rule to the base SlideStyle so
webview blocks get zero padding and margin without any stylesheet. Uses
BlockVariant rather than NamedVariant because a plain NamedVariant does
not activate for a rendered widget block.
Regenerated by pod install: adds irondash_engine_context and
super_native_extensions pods and the Embed Pods Frameworks build phase
so the macOS demo builds without a manual pod install.
SlideParts.background defaults to a transparent BackgroundPart, so a
slide with no background (e.g. a chrome-less template) rendered
see-through and bled adjacent slides through during cross-fade
transitions. Always paint an opaque base color beneath the background
part, sourced from a shared constant reused by the app shell letterbox.
@leoafarias
leoafarias merged commit 1f904ae into main Jul 10, 2026
6 checks passed
@leoafarias
leoafarias deleted the feat/block-variant-styles branch July 10, 2026 15:10
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