UNPKG

glide-design-system

Version:

Glide design system is an open-source React component library. It offers numerous benefits that make them essential tools for design and development teams.

100 lines (89 loc) 1.93 kB
/* The container */ .container { display: block; position: relative; padding-left: 26px; cursor: pointer; font-size: 16px; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; font-family: "Roboto, sans-serif"; } /* Hide the browser's default checkbox */ .container input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; } /* Create a custom checkbox */ .checkmark { position: absolute; top: 0; left: 0; height: 16px; width: 16px; background-color: #fff; border: solid 1px #797979; border-radius: 4px; } .disabled { background-color: #d7d7d7; border: 1px solid #d7d7d7; } /* On mouse-over, add a grey background color */ .container:hover input ~ .checkmark { background-color: #fff; } /* When the checkbox is checked, add a blue background */ .container input:checked ~ .checkmark { background-color: #1b3764; border: solid 0px #797979; } .container input:checked:disabled ~ .checkmark { background-color: #797979; border: solid 0px #797979; cursor: not-allowed; } .container input:disabled ~ .checkmark { cursor: not-allowed; } /* Create the checkmark/indicator (hidden when not checked) */ .checkmark:after { content: ""; position: absolute; display: none; } /* Show the checkmark when checked */ .container input:checked ~ .checkmark:after { display: block; } /* Style the checkmark/indicator */ .container .checkmark:after { left: 6px; top: 1px; width: 4px; height: 10px; border: solid white; border-width: 0 1px 1px 0; -webkit-transform: rotate(45deg); -ms-transform: rotate(45deg); transform: rotate(45deg); } .required { font-size: 16px; font-family: "Roboto, sans-serif"; display: flex; align-items: center; gap: 2px; } .headers { font-family: "Roboto", sans-serif; font-size: 14px; margin-bottom: 5px; display: flex; align-items: center; }