Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audit styling attributes across widgets #3257

Closed
jasongrout opened this issue Aug 24, 2021 · 3 comments · Fixed by #3534
Closed

Audit styling attributes across widgets #3257

jasongrout opened this issue Aug 24, 2021 · 3 comments · Fixed by #3534
Milestone

Comments

@jasongrout
Copy link
Member

As brought up in discussion from #2728, it would be nice to unify some of the styling attributes various widgets have, and make sure they are used consistently across all widgets (a style background attribute was one thing brought up there, for example).

@vidartf vidartf added this to the 8.0 milestone Jun 23, 2022
@vidartf
Copy link
Member

vidartf commented Jul 12, 2022

Looking at the latest spec, and grepping for "StyleModel", this is their support for background field:

  • ButtonStyleModel
  • CheckboxStyleModel
  • DescriptionStyleModel
  • HTMLMathStyleModel
  • HTMLStyleModel
  • LabelStyleModel
  • ProgressStyleModel
  • SliderStyleModel
  • TextStyleModel
  • ToggleButtonStyleModel
  • ToggleButtonsStyleModel

There are certain of these where it doesn't make sense to add the field for (e.g. button, as overriding it might make it seem unresponsive to click events), but it might be ok to add support for it, but document the potential pit fall for users?

This issue is also about potentially other fields, e.g. font_weight is just supported by 4 style models. so maybe the result of this audit should be a table of StyleModels x styling attributes.

@vidartf
Copy link
Member

vidartf commented Jul 12, 2022

AttributeButtonStyleModel CheckboxStyleModel DescriptionStyleModel HTMLMathStyleModel HTMLStyleModel LabelStyleModel ProgressStyleModel SliderStyleModel TextStyleModel ToggleButtonStyleModel ToggleButtonsStyleModel
background X X X X X
font_weightX X X X
button_colorX
text_decorationX X X
description_width X X X X X X X X X X
handle_color X
text_colorX X X X X X
button_width X
font_familyX X X
font_styleX X X
bar_color X
font_variantX X X
font_sizeX X X X X X

@jasongrout
Copy link
Member Author

For 8.0, let's put this awesome table in the docs, and worry about filling it out more in 8.1?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants