From 2665e3640e90ba62e50912a5e54b072490d08621 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Fri, 10 Sep 2021 14:19:57 -0700 Subject: [PATCH] CSS for half stars --- bookwyrm/static/css/bookwyrm.css | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/bookwyrm/static/css/bookwyrm.css b/bookwyrm/static/css/bookwyrm.css index 324e7df2..41793cf5 100644 --- a/bookwyrm/static/css/bookwyrm.css +++ b/bookwyrm/static/css/bookwyrm.css @@ -170,6 +170,21 @@ body { content: '\e9d9'; /* icon-star-full */ } + +/* Icons directly following half star inputs are marked as half */ +.form-rate-stars input.half:checked ~ .icon::before { + content: '\e9d8'; /* icon-star-half */ +} + +/* Icons directly following half check inputs that follow the checked input are emptied. */ +.form-rate-stars input.half:checked + input + .icon ~ .icon::before { + content: '\e9d7'; /* icon-star-empty */ +} + +/* Icons directly following inputs that follow the checked input are emptied. */ +.form-rate-stars input:checked ~ input + .icon::before { + content: '\e9d7'; /* icon-star-empty */ +} /* Icons directly following inputs that follow the checked input are emptied. */ .form-rate-stars input:checked ~ input + .icon::before { content: '\e9d7'; /* icon-star-empty */