Skip to content

Commit 6ff9fe5

Browse files
committed
forward background color from monospace to -block and -inline
1 parent bf4e16b commit 6ff9fe5

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

src/core/sass/brand.ts

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ const brandColorBundle = (
198198
);
199199
colorCssVariables.push(
200200
` --brand-${colorVar}: ${brand.getColor(colorKey)};`,
201-
)
201+
);
202202
}
203203

204204
// Map theme colors directly to Sass variables
@@ -222,7 +222,10 @@ const brandColorBundle = (
222222
}
223223
// const colorEntries = Object.keys(brand.color);
224224
colorVariables.push('// quarto-scss-analysis-annotation { "action": "pop" }');
225-
colorCssVariables.push("}", '// quarto-scss-analysis-annotation { "action": "pop" }');
225+
colorCssVariables.push(
226+
"}",
227+
'// quarto-scss-analysis-annotation { "action": "pop" }',
228+
);
226229
const colorBundle: SassBundleLayers = {
227230
key,
228231
// dependency: "bootstrap",
@@ -239,13 +242,13 @@ const brandColorBundle = (
239242

240243
const brandBootstrapBundle = (
241244
brand: Brand,
242-
key: string
245+
key: string,
243246
): SassBundleLayers => {
244247
// Bootstrap Variables from brand.defaults.bootstrap
245-
const brandBootstrap = (brand?.data?.defaults?.bootstrap as unknown as Record<
248+
const brandBootstrap = brand?.data?.defaults?.bootstrap as unknown as Record<
246249
string,
247250
Record<string, string | boolean | number | null>
248-
>);
251+
>;
249252

250253
const bsVariables: string[] = [
251254
"/* Bootstrap variables from _brand.yml */",
@@ -276,7 +279,7 @@ const brandBootstrapBundle = (
276279
"green",
277280
"teal",
278281
"cyan",
279-
]
282+
];
280283

281284
const bsColors: string[] = [
282285
"/* Bootstrap color variables from _brand.yml */",
@@ -459,6 +462,10 @@ const brandTypographyBundle = (
459462
// revealjs
460463
["size", "code-block-font-size"],
461464
["color", "code-block-color"],
465+
466+
// monospace forwards to both block and inline
467+
["background-color", "code-bg"],
468+
["background-color", "code-block-bg"],
462469
],
463470
"monospace-block": [
464471
// bootstrap + revealjs
@@ -566,7 +573,12 @@ export async function brandBootstrapSassBundleLayers(
566573
nameMap: Record<string, string> = {},
567574
): Promise<SassBundleLayers[]> {
568575
const brand = await project.resolveBrand(fileName);
569-
const sassBundles = await brandSassBundleLayers(fileName, project, key, nameMap);
576+
const sassBundles = await brandSassBundleLayers(
577+
fileName,
578+
project,
579+
key,
580+
nameMap,
581+
);
570582

571583
if (brand?.data?.defaults?.bootstrap) {
572584
const bsBundle = brandBootstrapBundle(brand, key);

0 commit comments

Comments
 (0)