Skip to content

FOLLOW-UP: Duplicate style blocks per component instance #305

@adnaan

Description

@adnaan

Context

This follow-up task was identified during the review of PR #292.

Source PR: #292
Suggested by: @claude[bot]

Task Description

Each component template emits its own <style> block via _shared.tmpl:

<style>[data-dropdown]:not(.open) [data-dropdown-panel]{display:none}</style>

A page with three dropdowns produces three identical <style> blocks. Browsers handle this correctly but it is unnecessary HTML weight.

Fix options:

  • Move these rules to the client library's stylesheet
  • Use a template-level dedup mechanism (e.g., only emit if not already present)
  • Document as a known trade-off

This issue was automatically created from PR #292 review comments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    follow-upFollow-up task from PR reviewfrom-reviewIssue originated from PR review

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions