vanilla-framework icon indicating copy to clipboard operation
vanilla-framework copied to clipboard

Add identifier to HTML generated by Vanilla macros for easier inspection

Open mattea-turic opened this issue 3 months ago • 4 comments

Currently, it’s difficult to verify whether developers are using Vanilla macros or custom macros by inspecting the code. This makes it hard to ensure consistency across projects and avoid situations where custom macros cause inconsistencies.

Proposal: (suggested by @jmuzina) Embed an identifier in the HTML generated by Vanilla patterns to make it clear when a Vanilla macro is being used. For example:

<section class="p-section" data-vanilla-pattern="section">

This would allow anyone inspecting the code to confirm whether the element originated from a Vanilla macro.

Considerations (brought up by @jmuzina):

How to distinguish between patterns from Vanilla itself vs. overridden/customised Vanilla patterns

@jmuzina , I assigned you here, but feel free to change if needed!

mattea-turic avatar Sep 11 '25 14:09 mattea-turic