Fix like to dislike bar appearing misaligned (#835)

* Fix CSS

* Implement more accurate method for getting like + dislike btn widths
This commit is contained in:
Eryk Darnowski
2024-06-16 20:39:56 +02:00
committed by GitHub
parent 7d2fe5019c
commit 08ee253c05
+2 -2
View File
@@ -19,8 +19,8 @@ function createRateBar(likes, dislikes) {
}
const widthPx =
getLikeButton().clientWidth +
getDislikeButton().clientWidth +
parseFloat(window.getComputedStyle(getLikeButton()).width) +
parseFloat(window.getComputedStyle(getDislikeButton()).width) +
(isRoundedDesign() ? 0 : 8);
const widthPercent =