Skip to content

Styling the refinementList check boxes #4505

Answered by mikebhart
mikebhart asked this question in General
Discussion options

You must be logged in to vote

For anyone interested here's the css code to style the refinementlist checkboxes:-

input[type=checkbox] {
	position: relative;
	cursor: pointer;
}

input[type=checkbox]::before {
	position: absolute;
	top: 0;
	left: 0;
	display: block;
	width: 16px;
	height: 16px;
	border: 1px solid orange;
	background-color: blue;
	content: "";
}

input[type=checkbox]:checked::after {
	position: absolute;
	top: 1px;
	left: 6px;
	display: block;
	width: 5px;
	height: 10px;
	border: solid blue;
	border-width: 0 2px 2px 0;
	content: "";
	-webkit-transform: rotate(45deg);
	-ms-transform: rotate(45deg);
	transform: rotate(45deg);
}

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Haroenv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Library: InstantSearch.js Issues in instantsearch.js
2 participants