{% load i18n static %} {% comment %} Token specimen (THM-016, icvoss/django-brickwork#268): live visual presentation of brand token values from the cascade this element sits in. Private render target of {% bw_token_specimen %} (templatetags/brickwork_theming.py): never {% include %} directly; the tag builds the row list from the token manifest (or validates tokens=). Optional context (supplied only by the tag): heading (str): section heading above the panes. rows (list of dicts): {name, kind, contrast_pair?, min_contrast?, conditional?, authored_per_theme?, collapses_to?}. Built by the tag. ``kind`` is colour | radius | elevation | type | space | other and selects the live sample (swatch, rounded tile, elevated tile, type sample, or spacing bar) so L3/L4 axes are visible without DevTools. themes (tuple): theme pane ids, default ("light", "dark"). Tag options: default load-bearing colours; ``tokens=`` custom list; ``level="L1"|"L2"|"L3"|"L4"`` uses recommended_tokens_for_level (THEME.md). States: none of its own. Each pane scopes data-theme so light and dark resolve side by side without flipping the page theme. Progressive enhancement (token-specimen.js) fills resolved computed values and measured contrast ratios; without JS those cells stay empty and the manifest minContrast floor still shows on contrast rows. Accessibility: the specimen is a section with an h2; each theme pane is a labelled group; visual samples are aria-hidden (the token name is the accessible label); contrast sample chips carry an accessible name naming both tokens and the required floor. Covered by axe.spec.mjs against token-specimen-*.html, both themes. Responsive: panes stack to one column below --bw-breakpoint-md; row grid remains name | sample | value at every width, with the contrast sample wrapping under the name when needed. {% endcomment %}
{% if heading %}

{{ heading }}

{% endif %}
{% for theme in themes %}

{% if theme == "light" %}{% translate "Light" %}{% else %}{% translate "Dark" %}{% endif %}

    {% for row in rows %}
  • {{ row.name }} {% if row.conditional %} {% translate "conditional" %} {% endif %} {% if row.authored_per_theme %} {% translate "per theme" %} {% endif %} {% if row.collapses_to %} {% blocktranslate with target=row.collapses_to %}collapses to {{ target }}{% endblocktranslate %} {% endif %}
    {% if row.kind == "colour" %} {% elif row.kind == "radius" %} {% elif row.kind == "elevation" %} {% elif row.kind == "type" %} {% elif row.kind == "space" %} {% else %} {% endif %} {% if row.contrast_pair %} {% endif %}
  • {% endfor %}
{% endfor %}