Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 31, 2025

This PR addresses the missing documentation for icon weight and variant (family) settings in the Deutsche Bahn Design System's Icons.md documentation.

Problem

The original Icons.md documentation was missing crucial information about how to control:

  • Icon weight/size using data-icon-weight attributes
  • Icon variant/family using data-icon-variant attributes

Solution

Enhanced the packages/foundations/docs/Icons.md file with comprehensive documentation including:

Icon Weight Control

  • data-icon-weight: Controls icon size with values 16, 20, 24, 32, 48, 64
  • data-icon-weight-before/data-icon-weight-after: Position-specific weight control

Icon Variant/Family Control

  • data-icon-variant: Controls icon style with values default, filled
  • data-icon-variant-before/data-icon-variant-after: Position-specific variant control

Combined Usage Examples

<!-- 32px filled icon before text -->
<span data-icon="user" data-icon-weight="32" data-icon-variant="filled">User Profile</span>

<!-- Different styling for before and after icons -->
<span 
  data-icon="star" 
  data-icon-weight-before="20" 
  data-icon-variant-before="filled"
  data-icon-trailing="arrow_right" 
  data-icon-weight-after="16" 
  data-icon-variant-after="default">
  Favorite Item
</span>

Validation

  • All existing builds and tests continue to pass
  • Created and tested examples to ensure documentation accuracy
  • Validated that all data attribute combinations work as documented
![Icon Documentation Test Validation](https://github.com/user-attachments/assets/45b7a70d-9eea-4379-8e2d-36239a90e306)

This enhancement provides developers with clear, actionable examples for controlling icon appearance, addressing the gap identified in the original issue.

Fixes #3961.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copy link

changeset-bot bot commented Aug 31, 2025

⚠️ No Changeset found

Latest commit: 4b86d61

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@Copilot Copilot AI changed the title [WIP] Fehlende Angaben zur Icon Verwendung Add comprehensive documentation for icon weight and variant usage Aug 31, 2025
@Copilot Copilot AI requested a review from mfranzke August 31, 2025 15:48
Copilot finished work on behalf of mfranzke August 31, 2025 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fehlende Angaben zur Icon Verwendung
2 participants