Skip to content

Commit 1242c6d

Browse files
committed
fix: defaults from defaults.bootstrap
1 parent 22bd9bd commit 1242c6d

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

examples/brand/_brand.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,12 @@ typography:
103103
decoration: "underline"
104104

105105
defaults:
106+
bootstrap:
107+
my-pink: "$brand-pink"
106108
shiny:
107109
theme:
108110
preset: shiny
109111
rules: |
110-
.navbar-brand { color: $brand-pink }
112+
.navbar-brand { color: $my-pink }
111113
# TODO: Find an appropriate theme variable to set
112114
# navbar-bg: $brand-purple

shiny/ui/_theme_brand.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,14 +257,14 @@ def _brand_defaults_bootstrap(brand: Brand) -> BrandBootstrapConfigFromYaml:
257257

258258
bootstrap: dict[str, Any] = brand.defaults["bootstrap"]
259259
defaults: dict[str, Any] = {
260-
k: v for k, v in bootstrap if k not in ("version", "preset")
260+
k: v for k, v in bootstrap.items() if k not in ("version", "preset")
261261
}
262262

263263
return BrandBootstrapConfigFromYaml(
264264
path="defaults.bootstrap",
265265
version=bootstrap.get("version"),
266266
preset=bootstrap.get("preset"),
267-
**defaults,
267+
defaults=defaults,
268268
)
269269

270270

0 commit comments

Comments
 (0)