Skip to content

Obsolete Button's StyleClassButton#6569

Open
Aeshus wants to merge 1 commit into
space-wizards:masterfrom
Aeshus:obsolete-button-styleclass
Open

Obsolete Button's StyleClassButton#6569
Aeshus wants to merge 1 commit into
space-wizards:masterfrom
Aeshus:obsolete-button-styleclass

Conversation

@Aeshus
Copy link
Copy Markdown
Contributor

@Aeshus Aeshus commented May 14, 2026

About the PR

Obsoleted the StyleClassButton string defined in ContainerButton and used in Button and in random places in content.

Why / Balance

RT shouldn't be defining StyleClasses to style these buttons. This should be something that people decide within content if they'd like to use StyleClasses, but we shouldn't be adding an extra way to duplicate a style across multiple ContainerButton child classes when the content Stylesheet creator can do that themselves without dirtying up RT code.

(There's also just better ways to do these selectors than using this StyleClass.)

Media

N/A

Migration(s)

Switch to E<T> selectors (they support inheritance), and switch to Parent/Child selectors for the Label. E<Button>.Class(ContainerButton.StyleClassButton) is the same as E<Button>.

Changes

Obsoleted the StyleClassButton string.

The Matches() thing already would capture if it you did Element<Button>,
so having a styleclass here is only really to make it easier to skip
actually scoping controls. If you want multiple things to look like
buttons, either they should inherit from the same base or the code be
duplicated.
@Aeshus Aeshus requested review from DrSmugleaf and PJB3005 as code owners May 14, 2026 13:28
@Tayrtahn Tayrtahn added the A: UI Things like game screens, menus, and windows. label May 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A: UI Things like game screens, menus, and windows.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants