Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

[TextField + Icon] Leading icon has incorrect padding #6618

Closed
@youra-h

Description

Bug report

Steps to reproduce

Taken from discord
image
For icon button necessary to use mdc-text-field__icon--trailing.margin-right: 4px;
Stille like this for prefix and suffix

/* TEXTFIELD PREFIX SUFFIX */
.mdc-text-field__affix--prefix {
    padding-right: 4px;
}
.mdc-text-field__affix--suffix {
    padding-left: 4px;
}

And
image

image

Final code

/* TEXTFIELD HELPER LINE */
.mdc-text-field+.mdc-text-field-helper-line {
    justify-content: left;
    padding: 0 14px;
}

/* TEXTFIELD ICONS */

.mdc-text-field {
    .mdc-icon-button {
        @include icon-button.size(44px);
    }
}

.mdc-text-field__icon--leading,
.mdc-text-field__icon--trailing {
    padding: 10px;
}

.mdc-text-field__icon--leading {
    margin: 0 4px;
}

.mdc-text-field__icon--trailing {
    margin: 0 4px;
}

.mdc-text-field--with-leading-icon {
    &.mdc-text-field--filled {
        .mdc-floating-label {
            left: 52px;
        }
    }
}

/* TEXTFIELD PREFIX SUFFIX */
.mdc-text-field__affix--prefix {
    padding-right: 4px;
}
.mdc-text-field__affix--suffix {
    padding-left: 4px;
}

Actual behavior

Expected behavior

Screenshots

Your Environment:

Software Version(s)
MDC Web 8.0.0
Browser Opera/Chrome
Operating System Windows

Additional context

Possible solution

Metadata

Assignees

No one assigned

    Labels

    Unresolved (Archived)Open and unresolved issues and PRs that were closed due to archiving the repository.accessibilitybug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions