Skip to content

Commit

Permalink
set the checkbox check icon to always 2px
Browse files Browse the repository at this point in the history
fix material toggle vertical alignment
  • Loading branch information
Tan Do committed Jul 2, 2018
1 parent 803d71d commit 0ebed79
Show file tree
Hide file tree
Showing 14 changed files with 43 additions and 32 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ CSS only, bootstrap compatible toggle, checkbox and radio buttons.

Several quick start options are available:

* [Download the latest release](https://github.com/alexdonh/toggle-checkbox-radio/releases/download/2.0.1/toggle-checkbox-radio-2.0.1.zip "Download toggle-checkbox-radio").
* [Download the latest release](https://github.com/alexdonh/toggle-checkbox-radio/releases/download/2.0.2/toggle-checkbox-radio-2.0.2.zip "Download toggle-checkbox-radio").
* Clone the repo: `git clone https://github.com/alexdonh/toggle-checkbox-radio.git`.
* Install with [npm](https://www.npmjs.com): `npm install toggle-checkbox-radio`.

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "toggle-checkbox-radio",
"version": "2.0.1",
"version": "2.0.2",
"main": [
"dist/toggle-checkbox-radio.css"
],
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "alexdonh/toggle-checkbox-radio",
"version": "2.0.1",
"version": "2.0.2",
"description": "CSS only, bootstrap compatible toggle, checkbox and radio buttons",
"keywords": [
"bootstrap",
Expand Down
16 changes: 10 additions & 6 deletions dist/toggle-checkbox-radio.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/toggle-checkbox-radio.css.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/toggle-checkbox-radio.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/toggle-checkbox-radio.min.css.map

Large diffs are not rendered by default.

16 changes: 10 additions & 6 deletions docs/assets/toggle-checkbox-radio.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/assets/toggle-checkbox-radio.css.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/assets/toggle-checkbox-radio.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/assets/toggle-checkbox-radio.min.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h1 class="display-4">toggle-checkbox-radio</h1>
<p class="lead">CSS only, bootstrap compatible toggle, checkbox and radio buttons.</p>
<hr class="my-4">
<p>
<a class="github-button" href="https://github.com/alexdonh/toggle-checkbox-radio/releases/download/2.0.1/toggle-checkbox-radio-2.0.1.zip" data-icon="octicon-cloud-download" data-size="large" aria-label="Download alexdonh/toggle-checkbox-radio on GitHub">Download</a>
<a class="github-button" href="https://github.com/alexdonh/toggle-checkbox-radio/releases/download/2.0.2/toggle-checkbox-radio-2.0.2.zip" data-icon="octicon-cloud-download" data-size="large" aria-label="Download alexdonh/toggle-checkbox-radio on GitHub">Download</a>
<a class="github-button" href="https://github.com/alexdonh/toggle-checkbox-radio" data-size="large" data-show-count="true" aria-label="Star alexdonh/toggle-checkbox-radio on GitHub">Github</a>
</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "toggle-checkbox-radio",
"version": "2.0.1",
"version": "2.0.2",
"description": "CSS only, bootstrap compatible toggle, checkbox and radio buttons",
"directories": {
"doc": "docs"
Expand Down
17 changes: 10 additions & 7 deletions scss/toggle-checkbox-radio.scss
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,14 @@
}

&.is-material {
margin: .25em .125rem;
margin: .275em .175rem;

&:before {
width: $input-size-base + .25rem;
height: $input-size-base + .25rem;
top: -.25rem;
left: -.25rem;
width: $input-size-base + .325rem;
height: $input-size-base + .325rem;
top: 50%;
transform: translateY(-50%);
left: -.325rem;
}

&:checked {
Expand Down Expand Up @@ -156,8 +157,8 @@
right: 0;
top: 12.5%;
height: 50%;
border-left: $input-border-width transparent solid;
border-bottom: $input-border-width transparent solid;
border-left: 2px transparent solid;
border-bottom: 2px transparent solid;
transform: rotate(-45deg);
}

Expand Down Expand Up @@ -205,6 +206,8 @@
height: $input-size-base / 2;
border-top: none;
border-right: none;
border-bottom-width: 2px;
border-left-width: 2px;
transform: rotate(-45deg) translate(12.5%, -12.5%);
background-color: transparent !important;
}
Expand Down

0 comments on commit 0ebed79

Please sign in to comment.