Skip to content

Commit

Permalink
style(textarea): use new field-sizing: content (#2463)
Browse files Browse the repository at this point in the history
implementing as dicussed in meeting 2024.09.19
  • Loading branch information
Barsnes authored Sep 19, 2024
1 parent d2b7a4d commit 1c67d53
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/clever-cobras-rescue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet-css": patch
---

Textarea: Use `field-sizing: content`
1 change: 1 addition & 0 deletions packages/css/textarea.css
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
resize: vertical;
background: var(--ds-color-neutral-background-default);
color: var(--ds-color-neutral-text-default);
field-sizing: content;
}

.ds-textarea--sm .ds-textarea__input {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ type Story = StoryObj<typeof Textarea>;
export default {
title: 'Komponenter/Textarea',
component: Textarea,
decorators: [
(Story: StoryFn) => (
<div style={{ width: '20rem' }}>
<Story />
</div>
),
],
} as Meta;

export const Preview: Story = {
Expand Down

0 comments on commit 1c67d53

Please sign in to comment.