UNPKG

@shakthillc/components

Version:

React generic components for shakthi products

66 lines (57 loc) 1.39 kB
.check-box { display: inline-block; } .check-box__each { display: block; position: relative; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: pointer; bottom: -1px; } /* Hide the browser's default checkbox */ .check-box__each input { position: absolute; opacity: 0; height: 0; width: 0; } /* Create a custom checkbox */ .check-box__checkmark { position: absolute; height: 16px; width: 16px; background-color: #eee; } /* On mouse-over, add a grey background color */ .check-box__checkmark:hover { background-color: #ccc; } /* When the checkbox is checked, add a blue background */ .check-box__each input:checked ~ .check-box__checkmark { background-color: #005397; } /* Create the checkmark/indicator (hidden when not checked) */ .check-box__checkmark:after { content: ""; position: absolute; display: none; } /* Show the checkmark when checked */ .check-box__each input:checked ~ .check-box__checkmark:after { display: block; } /* Style the checkmark/indicator */ .check-box__each .check-box__checkmark:after { left: 5px; top: 2px; width: 5px; height: 9px; border: solid white; border-width: 0 2px 2px 0; -webkit-transform: rotate(45deg); -ms-transform: rotate(45deg); transform: rotate(45deg); }