Skip to content

Commit c0de743

Browse files
committed
export and use when available: input height css style from probe
1 parent 356a86d commit c0de743

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

projects/packages/forms/src/blocks/contact-form/util/form-styles.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ window.jetpackForms.generateStyleVariables = function ( formNode ) {
9494
fontSize,
9595
fontFamily,
9696
lineHeight,
97+
inputHeight,
9798
} = window.getComputedStyle( inputNode );
9899

99100
styleProbe.remove();
@@ -112,6 +113,7 @@ window.jetpackForms.generateStyleVariables = function ( formNode ) {
112113
'--jetpack--contact-form--input-padding': inputPadding,
113114
'--jetpack--contact-form--input-padding-top': inputPaddingTop,
114115
'--jetpack--contact-form--input-padding-left': inputPaddingLeft,
116+
'--jetpack--contact-form--input-height': inputHeight,
115117
'--jetpack--contact-form--font-size': fontSize,
116118
'--jetpack--contact-form--font-family': fontFamily,
117119
'--jetpack--contact-form--line-height': lineHeight,

projects/packages/forms/src/contact-form/css/phone-field.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@
5454
resize: none;
5555
padding: 0;
5656
min-width: unset;
57+
min-height: unset;
58+
height: var(--jetpack--contact-form--input-height, unset);
5759

5860
&:not(.jetpack-field__input-prefix .jetpack-field__input-element) {
5961
letter-spacing: inherit;

0 commit comments

Comments
 (0)