From 4b7d16940de0d91bc761dc33cf1b8cb86afbd18d Mon Sep 17 00:00:00 2001 From: leone Date: Fri, 20 Sep 2024 21:42:48 -0300 Subject: [PATCH] star task --- src/index.html | 48 +++++++++++++++++++++++++++++++++++++++++++++++- src/style.css | 30 +++++++++++++++++++++++++++++- 2 files changed, 76 insertions(+), 2 deletions(-) diff --git a/src/index.html b/src/index.html index 3e4d7e8ab0..d804e687f7 100644 --- a/src/index.html +++ b/src/index.html @@ -13,6 +13,52 @@ /> -

Stars

+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + + +
diff --git a/src/style.css b/src/style.css index a63fa10d43..6fc75b0448 100644 --- a/src/style.css +++ b/src/style.css @@ -1 +1,29 @@ -/* add styles here */ +body { + margin: 0; +} + +.stars { + display: flex; +} + +.stars__star { + width: 16px; + height: 16px; + margin-right: 4px; + + background-image: url(./images/star.svg); + background-repeat: no-repeat; + background-position: center; +} + +.stars__star:last-child { + margin-right: 0; +} + +.stars--1 .stars__star:nth-child(-n + 1), +.stars--2 .stars__star:nth-child(-n + 2), +.stars--3 .stars__star:nth-child(-n + 3), +.stars--4 .stars__star:nth-child(-n + 4), +.stars--5 .stars__star:nth-child(-n + 5) { + background-image: url(./images/star-active.svg); +}