You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A big +1 to this one. One of the main reasons we support background_color on buttons is to satisfy the use case of "making a button stand out"; but most platforms have the ability to make "warning" and "error" buttons that entail a specific platform appearance. "Purpose" is a much better to approach that problem.
By way of naming - a quick survey of existing API naming for this idea:
Invent: purpose
iOS/macOS: role
paperCSS: class (leaning directly on CSS)
bootstrap: class (again, leaning on CSS)
Shoelace: variant
Textual: variant
I couldn't find any native concept of this idea for GTK, Winforms, WinUI3 or Android/Material3.
This is (almost literally) a bike shed, and there's no clearly established precedent for the feature, so IMHO any of the names purpose, role or variant are perfectly cromulent.
Invent buttons have a
purpose
property which currently accepts the following options:This is based on the list from PaperCSS, but Invent also intends to support other style frameworks, so the list is open to change.
Some of Toga's existing platforms support a similar concept, e.g. Apple calls it a "role".
The name of this property is TBD – "class" might be a more generic name, but it's a reserved word in Python.
The text was updated successfully, but these errors were encountered: