calcite-design-system icon indicating copy to clipboard operation
calcite-design-system copied to clipboard

fix(tab-nav, tab-title): centered layout allows to scroll to the extent

Open Elijbet opened this issue 2 years ago • 0 comments

Related Issue: #3682

Summary

The centering currently is achieved by applying justify-content: center to the flex container. However, there is a problem with this method when the flex item is bigger than the flex container. For horizontal overflow, the left section becomes inaccessible (or the right section, in RTL languages).

https://codepen.io/elijbet/pen/dyeNJZj

Solution: With auto margins, an overflowing flex item can be horizontally centered without losing access to any part of it.

The result, however, looks a bit different. So I’d like to feedback on whether I can keep the solution.

Current Centering: Screen Shot 2022-09-15 at 3 36 17 PM

Suggested Centering: Screen Shot 2022-09-15 at 3 36 58 PM

Elijbet avatar Sep 15 '22 23:09 Elijbet