{
+ const form = euiFormVariables(euiThemeContext);
+
return {
euiRangeWrapper: css`
display: flex;
@@ -38,11 +40,16 @@ export const euiRangeWrapperStyles = (euiThemeContext: UseEuiTheme) => {
}
}
`,
- regular: css`
- ${euiFormControlSize(euiThemeContext)}
+ // Skip the css`` on the default height to avoid generating a className
+ uncompressed: `
+ block-size: ${form.controlHeight};
`,
compressed: css`
- ${euiFormControlSize(euiThemeContext, { compressed: true })}
+ block-size: ${form.controlCompressedHeight};
+ `,
+ // Skip the css`` on the default width to avoid generating a className
+ formWidth: `
+ max-inline-size: ${form.maxWidth};
`,
fullWidth: css`
max-inline-size: 100%;
diff --git a/packages/eui/src/components/form/range/range_wrapper.tsx b/packages/eui/src/components/form/range/range_wrapper.tsx
index 24469bb374d..1ea52f76a39 100644
--- a/packages/eui/src/components/form/range/range_wrapper.tsx
+++ b/packages/eui/src/components/form/range/range_wrapper.tsx
@@ -38,9 +38,8 @@ export const EuiRangeWrapper = forwardRef(
const styles = euiRangeWrapperStyles(euiTheme);
const cssStyles = [
styles.euiRangeWrapper,
- !compressed && styles.regular,
- compressed && styles.compressed,
- fullWidth && styles.fullWidth,
+ compressed ? styles.compressed : styles.uncompressed,
+ fullWidth ? styles.fullWidth : styles.formWidth,
];
return (
diff --git a/packages/eui/src/components/inline_edit/__snapshots__/inline_edit_form.test.tsx.snap b/packages/eui/src/components/inline_edit/__snapshots__/inline_edit_form.test.tsx.snap
index c6cb5cd68aa..be6a1277ee2 100644
--- a/packages/eui/src/components/inline_edit/__snapshots__/inline_edit_form.test.tsx.snap
+++ b/packages/eui/src/components/inline_edit/__snapshots__/inline_edit_form.test.tsx.snap
@@ -28,7 +28,7 @@ exports[`EuiInlineEditForm edit mode editModeProps.cancelButtonProps 1`] = `