Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add whitespace when appending/prepending icon in uui-input #408

Merged
merged 2 commits into from
Jan 30, 2023

Conversation

nathanwoulfe
Copy link
Contributor

Description

When rendering an icon in the prepend or append slot in the uui-input component, the icon was lacking whitespace:
image

Changes here add whitespace (Append example has inline background color and left-padding):

image

image

For simplicity, the icon has a left-margin when prepended, and a right margin when appended, to move it off the input edge in both cases. Additional styling would need to depend on the context (ie an appended icon with a background color would need additional padding on the left side to separate the input text), which would need to be managed in the specific implementation.

Vertical alignment relies on the icon not being slotted directly, but using an enclosing element (this is the existing behaviour before this change):

<div
  slot="append"
  style="background:#f3f3f3; padding-left:var(--uui-size-2, 6px)">
  <uui-icon-registry-essential>
    <uui-icon name="delete"></uui-icon>
  </uui-icon-registry-essential>
</div>

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (minor updates related to the tooling or maintenance of the repository, does not impact compiled assets)

@iOvergaard iOvergaard changed the title Adds whitespace when appending/prepending icon in uui-input fix: Add whitespace when appending/prepending icon in uui-input Jan 30, 2023
@iOvergaard iOvergaard added the bug Something isn't working label Jan 30, 2023
@iOvergaard iOvergaard merged commit 3a86f01 into v1/contrib Jan 30, 2023
@iOvergaard iOvergaard deleted the append-prepend-icon-whitespace branch January 30, 2023 14:03
iOvergaard pushed a commit that referenced this pull request Apr 20, 2023
* alignment and whitespace

* fix padding in append example
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants