Skip to content

Commit 2fa8ca3

Browse files
committed
fix(@clayui/css): Forms use fixed value for $input-height-inner, $input-height-inner-half, $input-height-inner-quarter to reduce Sass errors with CSS custom properties in $input-line-height and $input-padding-y
fix(@clayui/css): Custom Forms $custom-select-feedback-icon-size, $custom-file-height-inner don't use $input-height-inner-* variables and change to fixed values to reduce Sass errors when input variables contain css custom properties The variables are deprecated any only used for Bootstrap 4's HTML 5 form validation components fixes #4247
1 parent bfd0435 commit 2fa8ca3

File tree

3 files changed

+15
-25
lines changed

3 files changed

+15
-25
lines changed

packages/clay-css/src/scss/atlas/variables/_forms.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,10 @@ $form-control-label-size: map-deep-merge(
245245
$form-control-label-size
246246
);
247247

248+
// Form Control Tag Group
249+
250+
$form-control-inset-margin-y: 0.3125rem !default;
251+
248252
// Form Group
249253

250254
$form-group-item-label-spacer: ($input-label-font-size * $line-height-base) +

packages/clay-css/src/scss/variables/_custom-forms.scss

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -339,8 +339,7 @@ $custom-select-feedback-icon-position: center right
339339

340340
/// @deprecated as of v3.x with no replacement
341341

342-
$custom-select-feedback-icon-size: $input-height-inner-half
343-
$input-height-inner-half !default;
342+
$custom-select-feedback-icon-size: 18px 18px !default;
344343

345344
// Custom Select Lg
346345

@@ -481,7 +480,7 @@ $custom-file-font-weight: $input-font-weight !default;
481480

482481
/// @deprecated as of v3.x with no replacement
483482

484-
$custom-file-height-inner: $input-height-inner !default;
483+
$custom-file-height-inner: 36px !default;
485484

486485
/// @deprecated as of v3.x with no replacement
487486

packages/clay-css/src/scss/variables/_forms.scss

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -51,30 +51,21 @@ $input-placeholder-disabled-color: null !default;
5151

5252
$input-plaintext-color: $body-color !default;
5353

54-
/// Deprecated
54+
/// @deprecated with no replacement
5555

5656
$input-height-border: $input-border-top-width + $input-border-bottom-width !default;
5757

58-
/// Deprecated
58+
/// @deprecated with no replacement
5959

60-
$input-height-inner: add(
61-
$input-line-height * 1em,
62-
$input-padding-y * 2
63-
) !default;
60+
$input-height-inner: 36px !default;
6461

65-
/// Deprecated
62+
/// @deprecated with no replacement
6663

67-
$input-height-inner-half: add(
68-
$input-line-height * 0.5em,
69-
$input-padding-y
70-
) !default;
64+
$input-height-inner-half: 18px 18px !default;
7165

72-
/// Deprecated
66+
/// @deprecated with no replacement
7367

74-
$input-height-inner-quarter: add(
75-
$input-line-height * 0.25em,
76-
$input-padding-y / 2
77-
) !default;
68+
$input-height-inner-quarter: 9px !default;
7869

7970
// Input Lg
8071

@@ -207,12 +198,8 @@ $form-control-tag-group-padding-y: (
207198
(map-get($form-control-label-size, margin-top))
208199
) / 2 !default;
209200

210-
$form-control-inset-min-height: $input-font-size * $input-line-height !default;
211-
$form-control-inset-margin-y: (
212-
$input-height - $input-border-bottom-width - $input-border-top-width -
213-
($form-control-tag-group-padding-y * 2) -
214-
$form-control-inset-min-height
215-
) / 2 !default;
201+
$form-control-inset-min-height: 1.5rem !default;
202+
$form-control-inset-margin-y: 0.125rem !default;
216203

217204
$form-control-inset: () !default;
218205
$form-control-inset: map-deep-merge(

0 commit comments

Comments
 (0)