Problem/Motivation

scss/_bootstrap-variables.scss line 35 sets $font-family-monospace to 'EB Garamond', 'Garamond', 'Times New Roman', 'Liberation Serif', 'Georgia', serif. That compiles to --bs-font-monospace, which Bootstrap applies in code, kbd, samp { font-family: var(--bs-font-monospace); }, so all genuine code markup renders in a proportional serif and loses its alignment. There is no real monospace stack anywhere in the theme, no SFMono, Menlo, Consolas or Courier.

The overload was deliberate. Bootstrap ships no $font-family-serif utility, and components/foundation/typography/typography.stories.twig used the resulting .font-monospace class to display the secondary typeface sample. So any fix has to keep that story working.

The Figma stylesheet defines only a heading font (Rubik) and a body font (EB Garamond) and says nothing about a monospace face, so nothing in the design calls for this. Everything else in the Figma foundation matches the theme correctly.

Steps to reproduce

  1. Build the theme front end on 1.0.x (verified at commit 566661c).
  2. Open any page or story containing code, kbd or samp markup.
  3. Inspect the computed font family: EB Garamond, a proportional serif, not a monospace face.
  4. The compiled CSS confirms it: --bs-font-monospace carries the serif stack.

Proposed resolution

  • $font-family-monospace becomes a real stack: 'SFMono-Regular', Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace.
  • components/base/root/root.scss gains --vb-font-serif and a .font-serif utility carrying $font-family-serif. The --vb- prefix follows the theme's existing convention for theme-owned tokens, stated in that same file, so it is never confused with a Bootstrap token.
  • The Typography story uses .font-serif instead of .font-monospace.

Verified: the theme front-end build is clean, and the compiled root.css publishes both --bs-font-monospace (real monospace) and --vb-font-serif (EB Garamond).

A merge request will follow.

Remaining tasks

  • ✅ File an issue
  • ❌ Addition/Change/Update/Fix
  • ❌ Testing to ensure no regression
  • ➖ Automated unit/functional testing coverage
  • ➖ Developer Documentation support
  • ➖ User Guide Documentation support
  • ➖ UX/UI designer responsibilities
  • ➖ Accessibility and Readability
  • ❌ Reviewed by a human
  • ❌ Code review by maintainers
  • ❌ Full testing and approval
  • ❌ Credit contributors
  • ❌ Review with the product owner
  • ❌ Update Release Notes
  • ❌ Release

User interface changes

  • code, kbd and samp render in a monospace face instead of EB Garamond.

API changes

  • A sub-theme overriding $font-family-monospace, or relying on .font-monospace to get the serif face, is affected and should move to .font-serif.

Data model changes

  • N/A

Release notes snippet

  • $font-family-monospace now carries a real monospace stack. The serif face moved to a new --vb-font-serif token and a .font-serif utility.
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

rajab natshah created an issue. See original summary.

rajab natshah’s picture

Status: Active » Needs review

rajab natshah’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.