Open Bug 1855803 (moz-button) Opened 1 year ago Updated 26 days ago

[meta] moz-button Reusable Component

Categories

(Toolkit :: UI Widgets, enhancement)

enhancement

Tracking

()

People

(Reporter: hjones, Unassigned)

References

(Depends on 11 open bugs, Blocks 2 open bugs)

Details

(Keywords: meta)

We have many different button variants in use throughout Firefox (primary buttons, ghost icon buttons, split buttons, toolbarbuttons, etc.). It seems worth trying to consolidate these different buttons into a single reusable HTMLElement. Doing so could allow us to:

That third point shouldn't be a performance concern, but it will prevent us from making these elements reusable since we don't want to load in-content styles in the chrome. This has happened before - relying on in-content/common.css for button styles in the message-bar component has led to us loading those styles in the chrome as message-bar is used in notificationbox.js. It also seems like overkill to add ~1500 lines of CSS just to get button styles when we're otherwise trying to lean into the benefits of using the shadow DOM to keep our styles lean/encapsulated.

Alias: moz-button
Depends on: 1858808
Depends on: 1858811
Depends on: 1858812
Depends on: 1858813
Depends on: 1858814
Depends on: 1860091
Depends on: 1865405
Depends on: 1870176
Depends on: 1875374
Depends on: 1883488
Depends on: 1885332
Depends on: 1894479
Depends on: 1898076
Depends on: 1898543
Depends on: 1910488
Depends on: 1910611
Depends on: 1911161
Depends on: 1920812
Depends on: 1921482
Depends on: 1912985
Depends on: 1932925
Depends on: 1936086
Depends on: 1942186
Depends on: 1942373
You need to log in before you can comment on or make changes to this bug.