Count a row written by hand in the design guard's stylesheet checks
`data-md-list-row` on an application's own `<li>`, `<div>`, `<tr>` or `<x-row>` draws its hover, focus and press state layer, its cursor and its `data-md-selected` fill from list-item.css, but missingStylesheets() and unusedStylesheets() read only component tags and `->links()`. ReStride had the stylesheet only because table.css imports it: had its last `<x-table>` gone, every hand-made row would have lost its states and its fill without a finding, and importing list-item.css for the rows directly was reported unused. A Blade view outside the package's own `resources/views` that writes a hook in the new `HOOK_STYLESHEETS` now needs that hook's stylesheet in both checks, named at the earliest line that needs it. The one entry is `data-md-list-row` → `components/list-item.css`, except on `<x-card>` (any spelling), whose row card.css draws; the card's opening tag is blanked out before the hook is read, and a selector such as `[data-md-list-row]` or a name in backticks writes no row. Nothing else list-rows.js, the skill or the README has an application write needs a stylesheet of its own: `data-md-list-open` and a row's `data-md-selected` are drawn only through the row, a selected row in `<x-table>` by table.css, `data-md-dragged` by foundation.css's `md-state-layer` or card.css, `data-md-field-control` by field.css inside `<x-field>`. The constant's docblock says so, and the guard's docblocks, the README, the skill and UPGRADE.md describe the check. A fixture test reads a hand-made `<li>` and `<tr>` row and a card-only view (plain and namespaced `<x-card data-md-list-row>`, and a selector in a script) against both checks; it fails without the change. A second test scans the package's list-item and card views and expects no row finding; it fails when package views are read. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
b62c83f244
commit
471d927e64
@@ -0,0 +1,11 @@
|
||||
{{-- A row written by hand: `data-md-list-row` in a comment writes none. --}}
|
||||
<ul>
|
||||
<li data-md-list-row @if ($open) data-md-selected @endif>
|
||||
<button type="button" wire:click="open" data-md-list-open>Report</button>
|
||||
</li>
|
||||
</ul>
|
||||
<table>
|
||||
<tr data-md-list-row data-md-selected>
|
||||
<td><a href="#" data-md-list-open>Report</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
Reference in New Issue
Block a user