Toolbar is-active link causes layout shift

Created on 5 June 2023, about 1 year ago
Updated 29 June 2023, 12 months ago

Problem/Motivation

When the page first loads none of the toolbar items have the is-active class. Once javascript is able to apply the is-active class the active item in the toolbar becomes bold. This increases the width of the Configuration item from 142px to 153px and the Appearance item from 129px to 139px.

Navigating quickly between items in the toolbar causes the position of the items to shift around rather than remaining static. If there are more items in the menu than the default this difference can cause the menu items to spill over on to multiple lines which is an even more jarring layout shift.

Steps to reproduce

Install standard profile.

Proposed resolution

Ensure the is-active class does not adjust the width of the toolbar item. Perhaps this means changing the background colour instead of using bold. This is consistent with tabs behaviour in Firefox and Chrome.

Before

After

An alternative solution to keep the bold text using pseudo-elements, see https://css-tricks.com/bold-on-hover-without-the-layout-shift/

Remaining tasks

Determine appropriate styles to use and implement them.

User interface changes

API changes

Data model changes

Release notes snippet

๐Ÿ› Bug report
Status

Needs work

Version

11.0 ๐Ÿ”ฅ

Component
Toolbarย  โ†’

Last updated 1 day ago

  • Maintained by
  • ๐Ÿ‡ซ๐Ÿ‡ทFrance @nod_
Created by

๐Ÿ‡ฆ๐Ÿ‡บAustralia mstrelan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024