input:checked + p { background: #F9F9F9; text-decoration: line-through; }
input[type="checkbox"] { margin: 20px; }
p { margin: 0; padding: 20px; transition: background 0.2s; flex: 1; font-family:'helvetica neue'; font-size: 20px; font-weight: 200; border-left: 1px solid #D1E2FF; } </style> <!-- The following is a common layout you would see in an email client.
When a user clicks a checkbox, holds Shift, and then clicks another checkbox a few rows down, all the checkboxes inbetween those two checkboxes should be checked.
--> <divclass="inbox"> <divclass="item"> <inputtype="checkbox"> <p>This is an inbox layout.</p> </div> <divclass="item"> <inputtype="checkbox"> <p>Check one item</p> </div> <divclass="item"> <inputtype="checkbox"> <p>Hold down your Shift key</p> </div> <divclass="item"> <inputtype="checkbox"> <p>Check a lower item</p> </div> <divclass="item"> <inputtype="checkbox"> <p>Everything in between should also be set to checked</p> </div> <divclass="item"> <inputtype="checkbox"> <p>Try to do it without any libraries</p> </div> <divclass="item"> <inputtype="checkbox"> <p>Just regular JavaScript</p> </div> <divclass="item"> <inputtype="checkbox"> <p>Good Luck!</p> </div> <divclass="item"> <inputtype="checkbox"> <p>Don't forget to tweet your result!</p> </div> </div>