From 16122847f7ef5196b6f27c7e306c436649b9a8a6 Mon Sep 17 00:00:00 2001 From: Michael Daineka Date: Tue, 6 Aug 2019 14:03:03 +0300 Subject: [PATCH] Adding abc-border-width support #143 --- awesome-bootstrap-checkbox.scss | 5 +++-- demo/build.css | 17 ++++++++++++----- package.json | 4 ++-- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/awesome-bootstrap-checkbox.scss b/awesome-bootstrap-checkbox.scss index 7ea3377..8ef9648 100644 --- a/awesome-bootstrap-checkbox.scss +++ b/awesome-bootstrap-checkbox.scss @@ -7,6 +7,7 @@ $font-family-icon: 'FontAwesome' !default; $fa-var-check: "\f00c" !default; $check-icon: $fa-var-check !default; +$abc-border-width: 5px !default; @mixin checkbox-variant($parent, $color) { #{$parent} input[type="checkbox"]:checked + label, @@ -55,7 +56,7 @@ $check-icon: $fa-var-check !default; top: 2px; left: 0; margin-left: -$form-check-input-gutter; - border: 1px solid $input-border-color; + border: $abc-border-width solid $input-border-color; border-radius: 3px; background-color: #fff; @include transition(border 0.15s ease-in-out, color 0.15s ease-in-out); @@ -187,7 +188,7 @@ $check-icon: $fa-var-check !default; top: 2px; left: 0; margin-left: -20px; - border: 1px solid $input-border-color; + border: $abc-border-width solid $input-border-color; border-radius: 50%; background-color: #fff; @include transition(border 0.15s ease-in-out); diff --git a/demo/build.css b/demo/build.css index 2ec3e87..2b8b2a6 100644 --- a/demo/build.css +++ b/demo/build.css @@ -18,10 +18,13 @@ top: 2px; left: 0; margin-left: -1.25rem; - border: 1px solid #ced4da; + border: 5px solid #ced4da; border-radius: 3px; background-color: #fff; transition: border 0.15s ease-in-out, color 0.15s ease-in-out; } + @media (prefers-reduced-motion: reduce) { + .abc-checkbox label::before { + transition: none; } } .abc-checkbox label::after { cursor: pointer; display: inline-block; @@ -175,10 +178,13 @@ top: 2px; left: 0; margin-left: -20px; - border: 1px solid #ced4da; + border: 5px solid #ced4da; border-radius: 50%; background-color: #fff; transition: border 0.15s ease-in-out; } + @media (prefers-reduced-motion: reduce) { + .abc-radio label::before { + transition: none; } } .abc-radio label::after { cursor: pointer; display: inline-block; @@ -249,9 +255,10 @@ .abc-radio-success input[type="radio"]:checked + label::after { background-color: #28a745; } -label .was-validated .form-check-input:invalid .abc-checkbox:before, label -.was-validated .form-check-input:invalid .abc-radio:before, label .form-check-input.is-invalid .abc-checkbox:before, label -.form-check-input.is-invalid .abc-radio:before { +label .was-validated .form-check-input:invalid .abc-checkbox:before, +label .was-validated .form-check-input:invalid .abc-radio:before, +label .form-check-input.is-invalid .abc-checkbox:before, +label .form-check-input.is-invalid .abc-radio:before { border-color: #dc3545; } /*# sourceMappingURL=build.css.map */ diff --git a/package.json b/package.json index c4026bd..a54afbf 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "bower.json" ], "devDependencies": { - "bootstrap": "4.0.0", - "font-awesome": "5.0.8" + "bootstrap": "^4.3.1", + "font-awesome": "4.7.0" } }