Skip to content

Commit

Permalink
fix(ld-input): overflow on placeholder element
Browse files Browse the repository at this point in the history
  • Loading branch information
borisdiakur committed Jun 2, 2021
1 parent 3ea272d commit a66f05d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
8 changes: 6 additions & 2 deletions src/liquid/components/ld-input/ld-input.css
Original file line number Diff line number Diff line change
Expand Up @@ -286,15 +286,19 @@ ld-input,
}
}

:where(.ld-input__placeholder) {
pointer-events: none;
.ld-input__placeholder {
position: absolute;
display: flex;
height: 100%;
align-items: center;
pointer-events: none;
color: var(--ld-col-rblck4);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
right: var(--ld-input-padding-x);
left: var(--ld-input-padding-x);
margin-right: 0;

[disabled] & {
opacity: 0.25;
Expand Down
19 changes: 13 additions & 6 deletions src/liquid/components/ld-input/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,17 +107,11 @@ This component can be used in conjunction with the [`ld-label`](/liquid/componen
{% example %}
<ld-input invalid placeholder="Placeholder"></ld-input>

<ld-input invalid placeholder="Placeholder" disabled></ld-input>

<!-- CSS component -->

<div class="ld-input ld-input--invalid">
<input placeholder="Placeholder">
</div>

<div class="ld-input ld-input--invalid" disabled>
<input placeholder="Placeholder" disabled>
</div>
{% endexample %}

### Type password
Expand Down Expand Up @@ -726,6 +720,19 @@ The `ld-input` web component does not provide any properties or methods for vali
| `"start"` | The purpose of this slot is to add icons or buttons to the input, __justifying the item to the end of the component__. Styling for `ld-icon` and `ld-button` is provided within the `ld-input` component. If you choose to place something different into the slot, you will probably need to adjust some styles on the slotted item in order to make it fit right. |


## Dependencies

### Used by

- docs-search

### Graph
```mermaid
graph TD;
docs-search --> ld-input
style ld-input fill:#f9f,stroke:#333,stroke-width:4px
```

----------------------------------------------

*Built with [StencilJS](https://stenciljs.com/)*

0 comments on commit a66f05d

Please sign in to comment.