src/static/scripts/components/post/postBody/postText/_redditPoll.scss
@use "../../../../../style/vars";

.redditPoll {
	display: block;

	> .bars {
		> div {
			display: flex;
			margin: .5rem 0;
			min-height: 2rem;
			cursor: default;
			position: relative;
			--percentage: 0;

			&::before {
				content: "";
				position: absolute;
				top: 0;
				bottom: 0;
				width: calc(1% * var(--percentage));
				min-width: 1rem;
				background: vars.$primary-contrast;
				color: vars.$text-on-primary;
				border-radius: 1rem;
			}

			&.myVote > .text {
				display: flex;

				&::after {
					content: "";
					width: 1.3rem;
					height: 1.3rem;
					margin-top: .35rem;
					margin-left: .5rem;
					display: block;
					background: url("/img/check.svg") center;
					background-size: contain;
					border: 2px solid vars.$text-color;
					border-radius: 1rem;
					box-sizing: border-box;
				}
			}

			> .text, .percentage {
				position: relative;
				padding: 0 1rem;
				line-height: 2rem;
			}

			> .percentage {
				margin-left: auto;
			}
		}
	}

	> .infoBar {
		display: flex;

		:first-child {
			margin-right: .5rem;
		}
	}

	> a {
		font-size: 1.1rem;
	}
}