Skip to content

[Icons] Document icon_sets configuration #2938

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/Icons/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ We recommend you to **lock** your icons **before** upgrading to UX Icons 2.24. W

- Add `aliases` configuration option to define icon alternative names.
- Add support for `int` and `float` attribute values in `<twig:ux:icon />`.
- Add support for Icon sets, configurable with `icon_sets` option.

## 2.19.0

- Add `ignore_not_found` option to silence error during rendering if the
- Add `ignore_not_found` option to silence error during rendering if the
icon is not found.

## 2.17.0
Expand Down
15 changes: 15 additions & 0 deletions src/Icons/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,21 @@ Full Configuration
# Whether to ignore errors when an icon is not found
ignore_not_found: false

# Icon sets configuration, array of prefix => icon set configuration
icon_sets:
# Icon set for "flags", can be used like this: ux_icon('flags:fr')
flags:
Comment on lines +631 to +634
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't add any "added in 2.20", this version is pretty old right now

It can either be mapped to a local directory...
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
It can either be mapped to a local directory...
# It can either be mapped to a local directory...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦🏻

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in #2939, thanks!

path: '%kernel.project_dir%/assets/images/flags'
... or to an existing icon set identifier
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
... or to an existing icon set identifier
# ... or to an existing icon set identifier

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in #2939, thanks!

alias: 'lucide'

# Override the default attributes (default_icon_attributes) for this icon set
icon_attributes:
class: 'flag' # Replace the default class
stroke: 'none' # Add a new attribute
fill: false # Use "false" to remove a default attribute

Learn more
----------

Expand Down