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

Disallow TextArea resize if cols is specified #1661

Open
Tracked by #1629
metonym opened this issue Feb 15, 2023 · 1 comment
Open
Tracked by #1629

Disallow TextArea resize if cols is specified #1661

metonym opened this issue Feb 15, 2023 · 1 comment
Labels
v11 Carbon v11 feature
Milestone

Comments

@metonym
Copy link
Collaborator

metonym commented Feb 15, 2023

A recent fix to the upstream Carbon library caught my eye: carbon-design-system/carbon#13069

It disables the "resize" attribute for TextArea if the cols prop is specified.

The differences in behavior compared to the Svelte implementation:

  • cols does not have a default value (the Svelte implementation defaults to 50)
  • if cols is not specified, the textarea has width=100%
  • if cols is specified, the textarea unsets width and applies the style rule resize=none

If we want to align with the upstream library, this would be a breaking change:

- export let cols = 50;
+ export let cols = undefined;

+ <textarea style:resize={typeof cols === "number" ? "none" : undefined} />
@theetrain
Copy link
Collaborator

Perhaps we can include this change as part of the v11 upgrade, assuming the flagship library adopted this behaviour in v11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v11 Carbon v11 feature
Projects
None yet
Development

No branches or pull requests

2 participants