diff --git a/packages/form-layout/src/vaadin-form-layout-mixin.js b/packages/form-layout/src/vaadin-form-layout-mixin.js index a556dfd3560..49858e831df 100644 --- a/packages/form-layout/src/vaadin-form-layout-mixin.js +++ b/packages/form-layout/src/vaadin-form-layout-mixin.js @@ -6,6 +6,13 @@ import { isElementHidden } from '@vaadin/a11y-base/src/focus-utils.js'; import { ResizeMixin } from '@vaadin/component-base/src/resize-mixin.js'; +function isValidCSSLength(value) { + // Check if the value is a valid CSS length and not `inherit` or `normal`, + // which are also valid values for `word-spacing`, see: + // https://drafts.csswg.org/css-text-3/#word-spacing-property + return CSS.supports('word-spacing', value) && !['inherit', 'normal'].includes(value); +} + /** * @polymerMixin * @mixes ResizeMixin @@ -98,26 +105,6 @@ export const FormLayoutMixin = (superClass) => return ['_invokeUpdateLayout(_columnCount, _labelsOnTop)']; } - /** @protected */ - ready() { - // Here we attach a style element that we use for validating - // CSS values in `responsiveSteps`. We can't add this to the `