Simple Toggle Switch

Category: Written by Ali / 5:51 PM

Published on
Tags
ListCSS3 TransformsCheckboxForm
No. of comments
No comments yet
Browser compatibility
Firefox 4, Safari 5.1, Chrome 14, Opera 10, IE 9
License
MIT License
A simple task list with custom checkboxes and pure CSS icons.

The custom checkboxes are created using a combination of the :checked and ~adjacent sibling selectors. This allows us to dynamically style an element that comes after the checkbox, as if it were the checkbox itself. The native inputs can then be hidden from view while we keep the ability to click/toggle by wrapping everything in a label.
The check marks use the same technique described in the check buttons snippet.
The list/3-lines icon is made of a simple rectangle with two offset shadows.
Original PSD by Wassim Bourguiba.
Check out my new project: DevDocs is a web app that provides a fast, all-in-one interface for reading API docs such as HTML and CSS.
Thank for sharing!

About The Author


Templateify

Praesent nec tortor quam. Quisque ac malesuada augue. Sed dignissim gravida odio ut bibendum. Cras fermentum euismod turpis. Nunc nec diam ante, et faucibus ipsum. Etiam imperdiet mattis elit et molestie. Nulla feugiat mollis leo vel egestas. Pellentesque convallis

3 comments: