Skip to content

Commit

Permalink
fix(textfield): break very long words within the Textarea's sizer ele…
Browse files Browse the repository at this point in the history
…ment
  • Loading branch information
stanvladut authored and Westbrook committed Aug 2, 2021
1 parent ecdc021 commit 2f95ac0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/textfield/src/textfield.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ governing permissions and limitations under the License.

:host([grows]) #sizer {
box-sizing: border-box;
overflow-wrap: break-word;
border: var(
--spectrum-textfield-border-size,
var(--spectrum-alias-border-size-thin)
Expand Down
13 changes: 13 additions & 0 deletions packages/textfield/stories/textarea.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,19 @@ export const grows = (): TemplateResult => html`
></sp-textfield>
`;

export const growsWithLargeWords = (): TemplateResult => html`
<sp-field-label for="story">
Enter your life story with very long words...
</sp-field-label>
<sp-textfield
multiline
id="story"
value="Sed utperspiciatisundeomnisistenatuserrorsitvoluptatemaccusantiumdoloremquelaudantium,totamemaperiam, eaque ipsa quae ab illo inventore veritatis etquasiarchitectobeataevitaedictasuntexplicabo. Nemo enimipsamvoluptatemquiavoluptassitaspernaturautoditautfugitsedquiaconsequunturmagnidoloreseosquirationevoluptatemsequinesciunt."
grows
placeholder="Enter your life story"
></sp-textfield>
`;

export const readonly = (): TemplateResult => html`
<sp-textfield
multiline
Expand Down

0 comments on commit 2f95ac0

Please sign in to comment.