Land a caller's class and style on the scaffold and tooltip roots
Plan step 39 (part 0): the step 38 review found <x-scaffold> and <x-tooltip> never referencing $attributes, so a caller's class and style were silently dropped. The scaffold's root is its single data-md-scaffold div; the tooltip's root, documented in its header, is the standalone wrapper it draws around a trigger (data-md-tooltip-anchor, merged with its own anchor-name) — passed an anchor instead, it renders only a popover fragment beside another component's root and takes nothing of the caller's. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qwx5USif3wFFmxtHg5U1g9
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
783f7902cc
commit
cfc57a9867
@@ -101,7 +101,8 @@
|
||||
window never clips what overhangs on purpose.
|
||||
|
||||
Nothing application-specific belongs in here: an app's destinations and chrome come in through
|
||||
the props and slots. --}}
|
||||
the props and slots. The caller's `class` and `style` land on the root, `data-md-scaffold`
|
||||
itself — the element `style="--material-banner: 4rem"` above sets a custom property on. --}}
|
||||
|
||||
@props([
|
||||
'destinations' => [],
|
||||
@@ -137,7 +138,7 @@
|
||||
$groups = $items->chunkWhile(fn (array $item, int $key, $chunk): bool => $item['section'] === $chunk->last()['section']);
|
||||
@endphp
|
||||
|
||||
<div data-md-scaffold>
|
||||
<div data-md-scaffold {{ $attributes->only(['class', 'style']) }}>
|
||||
<a href="#content" data-md-skip-link>{{ __('Skip to content') }}</a>
|
||||
|
||||
@isset($banner)
|
||||
|
||||
Reference in New Issue
Block a user