You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR was merged into the 2.x branch.
Discussion
----------
[Docs] Explain Icons SVG size
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| Docs? | yes
| Issues | -
| License | MIT
better explain that icons need their size specified, and explain how to do that.
Commits
-------
3307dc4 [Docs] Explain Icons SVG size
If your project uses a CSS framework like Tailwind or Bootstrap, prefer their
101
+
sizing utilities for consistency and theming:
102
+
103
+
.. code-block:: html+twig
104
+
105
+
{# Twig function #}
106
+
{{ ux_icon('bi:chat', {class: 'size-4'}) }}
107
+
108
+
{# HTML syntax #}
109
+
<twig:ux:icon name="bi:chat" class="size-4" />
110
+
111
+
To keep your design consistent and easily adjustable, consider defining a :ref:default attribute <icons_default_attributes>. This allows you to control the size of all your icons from a single place.
80
112
81
113
Icon Sets
82
114
~~~~~~~~~
@@ -328,6 +360,8 @@ HTML Syntax
328
360
329
361
``symfony/ux-twig-component`` is required to use the HTML syntax.
0 commit comments