Skip to content

Error message for field with slds-form-element_1-col class should be aligned with input #769

@mhankus

Description

@mhankus

(REQUIRED) Include one or more screenshots if applicable, as well as a Codepen with the
reduced test case.

error-label

Describe the issue. Is it a bug or a feature request (new component, new icon, new CSS class)?

When slds-form-element_1-col class is used on form element to change its size, it only impacts input. Error which is placed in tag with class slds-form-element__help preserves original position, making look inconsistent

Is this issue related to a specific component, variant, and/or state? If so, please detail which.

Are any specific browsers impacted by this bug?

Which version of the Salesforce Lightning Design System are you using?

What steps and/or code are needed to reproduce this issue?

<div class="slds-form__item" role="listitem">
  <div class="slds-form-element slds-form-element_horizontal slds-is-editing slds-form-element_1-col slds-has-error">
    <label class="slds-form-element__label" for="horizontal-form-element-id-14">Description</label>
    <div class="slds-form-element__control">
      <textarea id="horizontal-form-element-id-14" placeholder="Placeholder text…" class="slds-textarea">
        Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Etiam porta sem malesuada magna mollis euismod.
      </textarea>
    </div>
    <div class="slds-form-element__help" id="horizontal-form-element-error-id-01">Complete this field</div>
  </div>
</div>

What did you expect to happen?

Margin for element with slds-form-element__help class should be reduced, so that error will be aligned with input.

What actually happened?

Error is displayed in the middle of input as shown in screenshot

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions