Carbon: invalid textarea width

Created on 26 Aug 2019  路  8Comments  路  Source: carbon-design-system/carbon

in the examples on https://www.carbondesignsystem.com/components/text-input/code/ the invalid (validity error) textarea example is 24px wider than the others. I assume this is a mistake

visual 馃帹 bug 馃悰

All 8 comments

I think this is actually an issue w/ the component. The invalid class adds padding, which is making it wider than normal.

I think this is a non issue unless we want to set a fixed default width on the component

Can't we just add the extra padding to the basic textarea?

Curious what @carbon-design-system/design thinks of this solution

Screen Shot 2019-08-27 at 2 09 32 PM

I believe we wanted to avoid the extra right padding for valid textareas (from a discussion...back when I added the invalid icon during the v10 update), but maybe our stance has changed on that

I'm not sure how it should technically work but if this was in a form we wouldn't want the invalid field to be longer than the valid fields. Will the invalid state always increase in width? If yes, then I think we need to re-think the internal padding.

Unless a smaller width is specified on the container (bx--form--item), the invalid will be larger when there is no width specified. Link to example

Screen Shot 2019-09-04 at 11 19 03 AM

A user could fix this by adding width to their form items. Here is an example with a specified 300px width on form items:

Screen Shot 2019-09-04 at 11 19 58 AM

Ok, I'm wondering if we should just specify it in the example so users know that the invalid and valid widths should have width parity.

Since TextArea is now full width of the container (https://github.com/carbon-design-system/carbon/pull/4995), this shouldn't be an issue anymore. Will be reflected on the website once the package is updated.

Screen Shot 2020-01-28 at 12 57 00 PM

Was this page helpful?
0 / 5 - 0 ratings

Related issues

windgaucho picture windgaucho  路  3Comments

ConradSchmidt picture ConradSchmidt  路  3Comments

laurenmrice picture laurenmrice  路  3Comments

snidersd picture snidersd  路  3Comments

JordanWSmith15 picture JordanWSmith15  路  3Comments