Skip to content

Control the font used for book buttons in RAB books (BL-16351)#7977

Open
StephenMcConnel wants to merge 1 commit into
masterfrom
BL-16351-BookButtonFont
Open

Control the font used for book buttons in RAB books (BL-16351)#7977
StephenMcConnel wants to merge 1 commit into
masterfrom
BL-16351-BookButtonFont

Conversation

@StephenMcConnel

@StephenMcConnel StephenMcConnel commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Devin review


This change is Reviewable

@greptile-apps

greptile-apps Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds a single CSS rule to basePage-sharedRules.less that sets the font properties for book-button label <p> elements when they appear inside a .bloom-link-grid on a canvas element.

  • Introduces font-size: var(--DefaultBookButtonFontSize, 10pt), giving a CSS-variable hook for overriding the label size, with a 10pt default (≈13.3 px, slightly above the current 13 px set in navigationButtonsAndGrid.less). The new selector's higher specificity (four class selectors vs. one) means it wins the cascade.
  • Sets font-family: Andika, NotoSans, sans-serif, consistent with the project's existing web-font strategy: NotoSans is deliberately registered under that name via @font-face in bloomWebFonts.less (covering Devanagari, Thai, and Bengali scripts).

Important Files Changed

Filename Overview
src/content/bookLayout/basePage-sharedRules.less Adds a CSS rule controlling font-size (via CSS variable with 10pt fallback) and font-family for .bloom-bookButton p elements nested inside canvas elements; font name NotoSans is intentional and consistent with @font-face declarations elsewhere in the codebase

Reviews (1): Last reviewed commit: "Control the font used for book buttons i..." | Re-trigger Greptile

@StephenMcConnel StephenMcConnel self-assigned this Jun 17, 2026

@hatton hatton left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hatton made 1 comment.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on StephenMcConnel).


src/content/bookLayout/basePage-sharedRules.less line 293 at r1 (raw file):

.bloom-canvas .bloom-canvas-element .bloom-link-grid .bloom-bookButton p {
    font-size: var(--DefaultBookButtonFontSize, 10pt);
    font-family: Andika, NotoSans, sans-serif;

What if their language needs a different font? It doesn't seem like any fixed list will do here.

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 this pull request may close these issues.

2 participants