From b0b8d3c982ef5fedd720a0038f3f4546217a7e5b Mon Sep 17 00:00:00 2001 From: Martijn Cuppens Date: Fri, 1 Nov 2019 10:32:21 +0100 Subject: [PATCH] Convert v4-dev calc() left overs to add/subtract functions --- scss/_custom-forms.scss | 6 +++--- scss/_forms.scss | 12 ++++++------ scss/_variables.scss | 4 ++-- site/docs/4.3/assets/scss/_sidebar.scss | 6 +++--- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/scss/_custom-forms.scss b/scss/_custom-forms.scss index 8b3a74bc0b..7df1688fec 100644 --- a/scss/_custom-forms.scss +++ b/scss/_custom-forms.scss @@ -183,8 +183,8 @@ } &::after { - top: calc(#{(($font-size-base * $line-height-base - $custom-control-indicator-size) / 2)} + #{$custom-control-indicator-border-width * 2}); - left: calc(#{-($custom-switch-width + $custom-control-gutter)} + #{$custom-control-indicator-border-width * 2}); + top: add(($font-size-base * $line-height-base - $custom-control-indicator-size) / 2, $custom-control-indicator-border-width * 2); + left: add(-($custom-switch-width + $custom-control-gutter), $custom-control-indicator-border-width * 2); width: $custom-switch-indicator-size; height: $custom-switch-indicator-size; background-color: $custom-control-indicator-border-color; @@ -378,7 +378,7 @@ .custom-range { width: 100%; - height: calc(#{$custom-range-thumb-height} + #{$custom-range-thumb-focus-box-shadow-width * 2}); + height: add($custom-range-thumb-height, $custom-range-thumb-focus-box-shadow-width * 2); padding: 0; // Need to reset padding background-color: transparent; appearance: none; diff --git a/scss/_forms.scss b/scss/_forms.scss index 7a9a653e45..f91789d656 100644 --- a/scss/_forms.scss +++ b/scss/_forms.scss @@ -86,23 +86,23 @@ select.form-control { // For use with horizontal and inline forms, when you need the label (or legend) // text to align with the form controls. .col-form-label { - padding-top: calc(#{$input-padding-y} + #{$input-border-width}); - padding-bottom: calc(#{$input-padding-y} + #{$input-border-width}); + padding-top: add($input-padding-y, $input-border-width); + padding-bottom: add($input-padding-y, $input-border-width); margin-bottom: 0; // Override the `