I have the exact same code in production and sandbox. Things look as expected in sandbox, but in production I can see different css being applied. In Production the lightning input field is being rendered with a class of slds-form-element_horizontal. That class isn't applied in Sanboxes though.

    <lightning-record-edit-form record-id={contactId} object-api-name="Contact">

        <div class="slds-grid">
            <div class="slds-col slds-size_2-of-12"></div>

            <div class="slds-col slds-size_3-of-12">
                <lightning-input-field disabled field-name="FirstName">
            <div class="slds-col slds-size_3-of-12">
                <lightning-input-field disabled field-name="LastName">
            <div class="slds-col slds-size_4-of-12">

  • is your sandbox on the same version as your production? Are your APEX Classes set up to use the most recent API version?
    – gNerb
    Nov 15, 2019 at 21:25
  • where is yout lightning web component being used? Nov 15, 2019 at 21:48
  • is this communities? Nov 19, 2019 at 17:30
  • API version 47.0 on production and sandboxes. No Apex involved. I made a simple test with this as a record detail.
    – gneek
    Nov 19, 2019 at 17:31
  • @gneek where is this being used?Are you adding this component in another parent lightning component?
    – devforce
    Nov 19, 2019 at 17:32

1 Answer 1


Figured it out! I had to adjust my Display Density setting to Comfy. And now I see I can override that in code.
density=comfy on lightning-record-edit-form.

<lightning-record-edit-form density="comfy" record-id={contactId} object-api-name="Contact">


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .