@Kuper132

Как уменьшить код через stylus?

.guitar-slider  input[name='radiost']:nth-of-type(2)
			&:checked ~
				.radius-button-component
					.control-slide2
						.control__indicator
							&:after
								display block
								width 22px
								height 22px
								border-radius 10px
								background #4933f1

.guitar-slider  input[name='radiost']:nth-of-type(3)
	&:checked ~
		.radius-button-component
			.control-slide3
				.control__indicator
					&:after
						display block
						width 22px
						height 22px
						border-radius 10px
						background #4933f1


В данном коде стилизация инпута как можно уменьшить? через запятую пробовал неполучается
  • Вопрос задан
  • 199 просмотров
Пригласить эксперта
Ответы на вопрос 1
werty1001
@werty1001
undefined
for val in 2..3
	 .guitar-slider input[name='radiost']:nth-of-type({val}):checked ~ .radius-button-component .control-slide{val}
		.control__indicator
			&:after
				display block
				width 22px
				height 22px
				border-radius 10px
				background #4933f1
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы