-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from Adslot/checkbox-component
Added custom checkbox and radio buttons
- Loading branch information
Showing
6 changed files
with
148 additions
and
7 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
.icheckbox, | ||
.iradio { | ||
background-repeat: no-repeat; | ||
border: 0; | ||
cursor: pointer; | ||
display: inline-block; | ||
height: 16px; | ||
position: relative; | ||
vertical-align: middle; | ||
width: 16px; | ||
|
||
& + span { | ||
margin: 0 5px; | ||
} | ||
} | ||
|
||
.icheckbox { | ||
background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><rect y="0" fill="none" width="16" height="16"/><path fill="#FFFFFF" d="M4 14.5c-1.4 0-2.5-1.1-2.5-2.5V4c0-1.4 1.1-2.5 2.5-2.5h8c1.4 0 2.5 1.1 2.5 2.5v8c0 1.4-1.1 2.5-2.5 2.5H4z"/><path fill="#D3D3D3" d="M12 2c1.1 0 2 0.9 2 2v8c0 1.1-0.9 2-2 2H4c-1.1 0-2-0.9-2-2V4c0-1.1 0.9-2 2-2H12M12 1H4C2.4 1 1 2.3 1 4v8c0 1.6 1.4 3 3 3h8c1.6 0 3-1.4 3-3V4C15 2.3 13.7 1 12 1L12 1z"/></svg>'); | ||
|
||
&.hover { | ||
background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="none" d="M0 0h16v16H0z"/><path fill="#4AAFCD" d="M12 2c1.1 0 2 .9 2 2v8c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h8m0-1H4C2.4 1 1 2.3 1 4v8c0 1.6 1.4 3 3 3h8c1.6 0 3-1.4 3-3V4c0-1.7-1.3-3-3-3z"/></svg>'); | ||
} | ||
|
||
&.checked { | ||
background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="none" d="M0 0h16v16H0z"/><path fill="#4AAFCD" d="M15 12c0 1.6-1.4 3-3 3H4c-1.7 0-3-1.4-3-3V4c0-1.7 1.3-3 3-3h8c1.6 0 3 1.3 3 3v8z"/><path fill="#FFF" d="M11.5 4.7c-.2-.2-.5-.1-.7.1l-4.1 5.4-1.5-1.8c-.2-.2-.5-.3-.7-.1-.2.2-.2.5-.1.7l1.9 2.3c.1.1.2.2.4.2.1 0 .3-.1.4-.2l4.5-5.9c.1-.2.1-.5-.1-.7z"/></svg>'); | ||
} | ||
|
||
&.disabled { | ||
background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="none" d="M0 0h16v16H0z"/><path fill="#FFF" d="M4 14.5c-1.4 0-2.5-1.1-2.5-2.5V4c0-1.4 1.1-2.5 2.5-2.5h8c1.4 0 2.5 1.1 2.5 2.5v8c0 1.4-1.1 2.5-2.5 2.5H4z"/><path fill="#F1F2F2" d="M12 2c1.1 0 2 .9 2 2v8c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h8m0-1H4C2.4 1 1 2.3 1 4v8c0 1.6 1.4 3 3 3h8c1.6 0 3-1.4 3-3V4c0-1.7-1.3-3-3-3z"/></svg>'); | ||
|
||
&, | ||
&.checked { | ||
cursor: default; | ||
} | ||
|
||
&.checked { | ||
background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#F1F2F2" d="M15 12c0 1.6-1.4 3-3 3H4c-1.7 0-3-1.4-3-3V4c0-1.7 1.3-3 3-3h8c1.6 0 3 1.3 3 3v8z"/><path fill="#E6E7E8" d="M11.5 4.7c-.2-.2-.5-.1-.7.1l-4.1 5.4-1.5-1.8c-.2-.2-.5-.3-.7-.1-.2.2-.2.5-.1.7l1.9 2.3c.1.1.2.2.4.2.1 0 .3-.1.4-.2l4.5-5.9c.1-.2.1-.5-.1-.7z"/></svg>'); | ||
} | ||
} | ||
} | ||
|
||
.iradio { | ||
&, | ||
&.hover { | ||
background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#FFFFFF" d="M8 14.1c-3.4 0-6.1-2.8-6.1-6.1S4.6 1.9 8 1.9s6.1 2.8 6.1 6.1S11.4 14.1 8 14.1z"/><path fill="#D3D3D3" d="M8 2.4c3.1 0 5.6 2.5 5.6 5.6s-2.5 5.6-5.6 5.6S2.4 11.1 2.4 8 4.9 2.4 8 2.4M8 1.4c-3.7 0-6.6 3-6.6 6.6s3 6.6 6.6 6.6 6.6-3 6.6-6.6S11.7 1.4 8 1.4L8 1.4z"/></svg>'); | ||
} | ||
|
||
&.checked { | ||
background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#FFFFFF" d="M8 14.1c-3.4 0-6.1-2.8-6.1-6.1S4.6 1.9 8 1.9s6.1 2.8 6.1 6.1S11.4 14.1 8 14.1z"/><path fill="#4AAFCD" d="M8 2.4c3.1 0 5.6 2.5 5.6 5.6s-2.5 5.6-5.6 5.6S2.4 11.1 2.4 8 4.9 2.4 8 2.4M8 1.4c-3.7 0-6.6 3-6.6 6.6s3 6.6 6.6 6.6 6.6-3 6.6-6.6S11.7 1.4 8 1.4L8 1.4z"/><path fill="#4AAFCD" d="M8 12.4c-2.4 0-4.4-2-4.4-4.4s2-4.4 4.4-4.4 4.4 2 4.4 4.4S10.4 12.4 8 12.4z"/></svg>'); | ||
} | ||
|
||
&.disabled { | ||
background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="none" d="M0 0h16v16"/><circle fill="#D3D3D3" cx="8" cy="8" r="6.6"/></svg>'); | ||
|
||
&, | ||
&.checked { | ||
cursor: default; | ||
} | ||
|
||
&.checked { | ||
background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#FFFFFF" d="M8 14.1c-3.4 0-6.1-2.8-6.1-6.1S4.6 1.9 8 1.9s6.1 2.8 6.1 6.1S11.4 14.1 8 14.1z"/><path fill="#D3D3D3" d="M8 2.4c3.1 0 5.6 2.5 5.6 5.6s-2.5 5.6-5.6 5.6S2.4 11.1 2.4 8 4.9 2.4 8 2.4M8 1.4c-3.7 0-6.6 3-6.6 6.6s3 6.6 6.6 6.6 6.6-3 6.6-6.6S11.7 1.4 8 1.4L8 1.4z"/><path fill="#D3D3D3" d="M8 12.4c-2.4 0-4.4-2-4.4-4.4s2-4.4 4.4-4.4 4.4 2 4.4 4.4S10.4 12.4 8 12.4z"/></svg>'); | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters