-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Subtheme functions #5430
Subtheme functions #5430
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do think we need a different prefix than theme_
, but conceptually I think it should be shorter since the whole point of these functions are to be shortcuts... maybe just th_
? Or maybe that is too unpronouncable...
I like this as an idea, but I'm not sure we can gracefully compact the word 'theme' any futher. Using I don't think of these functions as strictly shortcuts (as in abbreviations): they mostly avoid needless repetition in argument names. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I would probably prefer theme_sub_*()
then (I know that is longer even). I like that all theme functions have the same (partial) prefix
p +
theme_minimal() +
theme_sub_axis(...)
looks more organised than
p +
theme_minimal() +
subtheme_axis(...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR aims to fix #5301.
Briefly, it adds functions that allow specifying parts of a theme with shorter arguments.
A few considerations:
@usage
section.subtheme_*()
as to avoid confusion with e.g.theme_light()
which is conceptually doing a different thing?