From 0d2a2830cd3fcda1622dfff058a2b3a9b5f28684 Mon Sep 17 00:00:00 2001 From: David Buchmann <david.buchmann@liip.ch> Date: Sun, 30 Mar 2025 17:34:27 +0200 Subject: [PATCH] [Icons] explain svg colors and improve example configuration --- src/Icons/doc/index.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Icons/doc/index.rst b/src/Icons/doc/index.rst index a20222fd244..daf8bb82a25 100644 --- a/src/Icons/doc/index.rst +++ b/src/Icons/doc/index.rst @@ -83,6 +83,9 @@ define the HTML attributes added to the ``<svg>`` element: {{ ux_icon('user-profile', {height: '16px', width: '16px', 'aria-hidden': true}) }} {# renders <svg height="16" width="16" aria-hidden="true"> ... </svg> #} +Typically, icon SVG use `fill='currentColor'` to inherit the color of the containing +element. You can use CSS to set the color either on the containing element or in a class +or style attribute of the icon itself. Icon Sets ~~~~~~~~~