From 0b367aaa0f83ed0ef1ec75397d02dfef6337d4fc Mon Sep 17 00:00:00 2001 From: Paul Vinson Brown Date: Thu, 22 Jun 2023 15:09:25 +0300 Subject: [PATCH] Replace with inline SVG --- .../feed/examples/css/feedDisplay.css | 35 +++++++++++++++++++ .../patterns/feed/examples/js/feedDisplay.js | 31 ++++++++++++---- 2 files changed, 59 insertions(+), 7 deletions(-) diff --git a/content/patterns/feed/examples/css/feedDisplay.css b/content/patterns/feed/examples/css/feedDisplay.css index 64a44dfa4d..7a55b6e9d5 100644 --- a/content/patterns/feed/examples/css/feedDisplay.css +++ b/content/patterns/feed/examples/css/feedDisplay.css @@ -79,3 +79,38 @@ body { padding: 10px; width: 100%; } + +.restaurant-rating svg g { + color: #ffde00; +} + +.restaurant-rating svg .star { + stroke-width: 2px; + stroke: #f8951d; + fill-opacity: 0; +} + +.restaurant-rating[data-rating-value="1"] svg .star-1 .star { + fill: currentcolor; + fill-opacity: 1; +} + +.restaurant-rating[data-rating-value="2"] svg .star-2 .star { + fill: currentcolor; + fill-opacity: 1; +} + +.restaurant-rating[data-rating-value="3"] svg .star-3 .star { + fill: currentcolor; + fill-opacity: 1; +} + +.restaurant-rating[data-rating-value="4"] svg .star-4 .star { + fill: currentcolor; + fill-opacity: 1; +} + +.restaurant-rating[data-rating-value="5"] svg .star-5 .star { + fill: currentcolor; + fill-opacity: 1; +} diff --git a/content/patterns/feed/examples/js/feedDisplay.js b/content/patterns/feed/examples/js/feedDisplay.js index 644f1cb597..0b1931f0dc 100644 --- a/content/patterns/feed/examples/js/feedDisplay.js +++ b/content/patterns/feed/examples/js/feedDisplay.js @@ -211,14 +211,31 @@ aria.FeedDisplay.prototype.renderItemData = function (itemData) { itemContent += '
' + - '' + + '">' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + '
'; describedbyIDs.push(ratingID); }