-
Notifications
You must be signed in to change notification settings - Fork 58
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
feat(theme): Branded theming via brand.yml #1148
base: main
Are you sure you want to change the base?
Conversation
``` theme: preset: brand ``` ``` theme: preset: { brand: "path/to/brand.yml" } ```
Saving a real print method for the `brand.yml` package
"brand_base" = switch_version( | ||
version, | ||
five = sass_layer_file( | ||
system_file("brand", "bs5", "_brand-yml.scss", package = "bslib") | ||
), | ||
default = list() | ||
), |
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.
Should we be throwing an error if version is less than 5?
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'm not sure... we don't have a fully adapted branded theme for BS <= 4 but there are still a number of features of brand that are useful. It's also possible that a user could fill in their own implementation for BS <= 4 using only the tools already present in brand.yml. So erroring here feels too aggressive. I'll add a warning instead.
Looks great overall! Consider this approved when all suggestions are considered/addressed and if there's no new major code changes. I will be mostly away until the 10th, but if you have questions that can be addressed asynchronously, I'll be checking Slack/GitHub periodically. |
Adds support for branded theming via
bs_theme(brand = TRUE)
.There are few choices:
Or in YAML where
bs_theme()
is called:TODO
bs_theme()
Monda.ttf
and download it as needed on app load