From e614bf6feebc17feb23133b850183c8dd3962721 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Ga=C5=82ek?= Date: Thu, 11 Jul 2024 09:03:50 +0200 Subject: [PATCH] replaced custom css class with tailwind one (#91) --- ...ed-multicolor-icons-using-a-single-DOM-element.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/_posts/2024-01-10-embed-multicolor-icons-using-a-single-DOM-element.md b/_posts/2024-01-10-embed-multicolor-icons-using-a-single-DOM-element.md index ab6f48bb..61c1aa1b 100644 --- a/_posts/2024-01-10-embed-multicolor-icons-using-a-single-DOM-element.md +++ b/_posts/2024-01-10-embed-multicolor-icons-using-a-single-DOM-element.md @@ -64,7 +64,7 @@ About five years ago, we considered using CSS masks, but we still supported IE b At that time, we had not yet thought of combining it with fragments. As a case study let’s pick one of our icons — -a-icon. +a-icon. With the following source: @@ -111,10 +111,10 @@ As a result, the SVG is supposed to look like this: It produces 4 fragments, one for each of the three paths and the last for the whole icon. Each of them can now be rendered as a separate image: -1. [`#a`](https://a.allegroimg.com/original/34901c/db3b33c5488eb13bc5244e215953/illustration-allegro-in-circle-big-ab3336c0b3#a) — #a -2. [`#border`](https://a.allegroimg.com/original/34901c/db3b33c5488eb13bc5244e215953/illustration-allegro-in-circle-big-ab3336c0b3#border) — #border -3. [`#shadow`](https://a.allegroimg.com/original/34901c/db3b33c5488eb13bc5244e215953/illustration-allegro-in-circle-big-ab3336c0b3#shadow) — #shadow -4. [`#icon`](https://a.allegroimg.com/original/34901c/db3b33c5488eb13bc5244e215953/illustration-allegro-in-circle-big-ab3336c0b3#icon) — #icon +1. [`#a`](https://a.allegroimg.com/original/34901c/db3b33c5488eb13bc5244e215953/illustration-allegro-in-circle-big-ab3336c0b3#a) — #a +2. [`#border`](https://a.allegroimg.com/original/34901c/db3b33c5488eb13bc5244e215953/illustration-allegro-in-circle-big-ab3336c0b3#border) — #border +3. [`#shadow`](https://a.allegroimg.com/original/34901c/db3b33c5488eb13bc5244e215953/illustration-allegro-in-circle-big-ab3336c0b3#shadow) — #shadow +4. [`#icon`](https://a.allegroimg.com/original/34901c/db3b33c5488eb13bc5244e215953/illustration-allegro-in-circle-big-ab3336c0b3#icon) — #icon Now, the regular fragment-less URL will display a blank image. Thus, for the full icon, we’re going to add a [`#icon`](https://a.allegroimg.com/original/34c91a/651290b94002acbe836ae520e8ff/illustration-allegro-in-circle-big-ab3336c0b3#icon) fragment to the URL. @@ -188,7 +188,7 @@ Usually, icons are [purely decorative content](https://developer.mozilla.org/en- That’s why we remove them from the accessibility tree by `aria-hidden="true"`. The result is supposed to look like the original icon from the start — -the original icon from the beginning. +the original icon from the beginning. Now, the single element gives us control over up to three parts of our icon. Moreover, we can change colors independently and dynamically.