Skip to content

Auto width for longer options #129

Closed
@sfentress

Description

@sfentress

When options are longer than can fit in the 220px box, they get cut off.

I know that width has been brought up in the issue list a number of times, but the answer generally seems to be "set your width explicitly in your css." This doesn't work if we have dynamic content and don't know ahead of time how wide our boxes need to be.

Regular select boxes handle dynamic widths just fine, so it's natural to assume that this would as well.

I have a simple jsFiddle which auto-sets the width and max-widths of the select box to fit the widths required by the contents: http://jsfiddle.net/SamFent/TYpRq/. The text inside that last select can be made arbitrarily long, and the select box expands to fit.

Is there any reason why this pattern can't be the default, or at least an option?

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions