Add explicit icon and label support for button CSS components.

Review Request #13289 — Created Sept. 26, 2023 and submitted — Latest diff uploaded

Information

Review Board
release-6.x

Reviewers

This updates rb-c-button to include __icon and __label parts for
defining buttons containing both icons and labels in a consistent
manner. This will be styled with an appropriate gap in-between the two,
when both are present and visible.

Buttons now use flexbox for layout to enable this, and to ensure that
everything lines up correctly.

There are two new macros for customizing icons:

  • #rb-ns-ui.buttons.set-icon-only() will hide the label on a button
    and update the padding so the button looks correct with just an icon.

  • #rb-ns-ui.buttons.set-fa-icon() takes a FontAwesome icon variable
    and set it on the __icon part.

Tested with existing buttons, button groups, and menu buttons throughout
the UI.

Tested with some in-progress icon-only and icon-enabled buttons.

Commits

Files