diff --git a/.changeset/clever-cobras-rescue.md b/.changeset/clever-cobras-rescue.md new file mode 100644 index 0000000000..83fa3a1120 --- /dev/null +++ b/.changeset/clever-cobras-rescue.md @@ -0,0 +1,5 @@ +--- +"@digdir/designsystemet-css": patch +--- + +Textarea: Use `field-sizing: content` diff --git a/packages/css/textarea.css b/packages/css/textarea.css index 3232dcce35..4dd04d7235 100644 --- a/packages/css/textarea.css +++ b/packages/css/textarea.css @@ -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 { diff --git a/packages/react/src/components/form/Textarea/Textarea.stories.tsx b/packages/react/src/components/form/Textarea/Textarea.stories.tsx index 8de61496a3..736a23a581 100644 --- a/packages/react/src/components/form/Textarea/Textarea.stories.tsx +++ b/packages/react/src/components/form/Textarea/Textarea.stories.tsx @@ -10,6 +10,13 @@ type Story = StoryObj; export default { title: 'Komponenter/Textarea', component: Textarea, + decorators: [ + (Story: StoryFn) => ( +
+ +
+ ), + ], } as Meta; export const Preview: Story = {