eBay / ebayui-core

Collection of Marko widgets; considered to be the core building blocks for all eBay components, pages & apps
https://ebay.github.io/ebayui-core/
Other
217 stars 103 forks source link

Button: add fixed height and trunctation options #462

Closed seangates closed 5 years ago

seangates commented 6 years ago

Feature Request

Description

The button module from Skin was recently updated to support wrapping and overflow to match the way native HTML buttons work. In the scenario when buttons are given a fixed width, they may cause overflow for the buttons text, and in certain cases the text needs to be truncated. Truncation will force the button to single line of text and add the ellipsis. Although truncation is supported, in most cases it is the last resort and should be used sparingly.

This change would add:

To note, the truncation class from Skin will not work in the case of the pill buttons, as their requirement is to fill two lines of space, then truncate as needed. CSS only allows a single line of text to add an ellipsis. Therefore, we will cover that scenario in a separate task related to the pills, and do so with JavaScript.

Context

Skin PR: https://github.com/eBay/skin/pull/401

ianmcburnie commented 5 years ago

Merged into 2.0.0. Closing.