Skip to content

fix(type): disable font ligatures across all typography classes and themes AB#1608258 - #299

Merged
jason-capsule42 merged 2 commits into
masterfrom
jbaker/ligatureRemoval
Aug 20, 2026
Merged

fix(type): disable font ligatures across all typography classes and themes AB#1608258#299
jason-capsule42 merged 2 commits into
masterfrom
jbaker/ligatureRemoval

Conversation

@jason-capsule42

@jason-capsule42 jason-capsule42 commented Aug 19, 2026

Copy link
Copy Markdown
Member

Tickets

AB#1608258

Alaska Air Group brand guidelines prohibit the use of "ligatures" — decorative glyphs that fuse adjacent letter pairs (for example, the joined "fl" in "flight search"). Our shared typography styles were letting browsers render these ligatures by default, which put on-screen text out of compliance with the brand standard across every product using the design system.

This change turns ligatures off for all of the modern typography styles, for every brand theme (Alaska, Alaska Classic, Atmos, and Hawaiian — including the Chronicle Display font). Text now renders with plain, unjoined letters everywhere, bringing the typography back into brand compliance with no other visual change.

Tracking ticket: AB#1608258.

Links:


Alaska Airlines Pull Request

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Resolves: # (issue, if applicable)

Summary:

Please summarize the scope of the changes you have submitted, what the intent of the work is and anything that describes the before/after state of the project.

Type of change:

Please delete options that are not relevant.

  • New capability
  • Revision of an existing capability
  • Infrastructure change (automation, etc.)
  • Other (please elaborate)

Checklist:

  • My update follows the CONTRIBUTING guidelines of this project
  • I have performed a self-review of my own update

By submitting this Pull Request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Pull Requests will be evaluated by their quality of update and whether it is consistent with the goals and values of this project. Any submission is to be considered a conversation between the submitter and the maintainers of this project and may require changes to your submission.

Thank you for your submission!

-- Auro Design System Team

Summary by Sourcery

Enforce the brand requirement for fully disabled ligatures throughout the typography system and shipped style bundles.

New Features:

  • Add a shared typography mixin that enforces the brand-wide ligature policy.

Bug Fixes:

  • Disable all font ligatures across base styles and modern typography classes for every supported theme, including legacy bundles and Hawaiian display typography.

Enhancements:

  • Apply the same ligature policy to body, display, heading, and accent classes across both generated typography variants.

Documentation:

  • Add post-mortem documentation describing the ligature compliance issue, resolution, and outcome.

Tests:

  • Add regression coverage for ligature behavior across CSS-variable and static-fallback typography generators.

Chores:

  • Regenerate distributed CSS bundles and SassDoc output for the updated typography styles.

…hemes AB#1608258

Alaska Air Group brand guidelines prohibit ligature use across all brand
typefaces, but the modern typography classes rendered ligatures by default
because neither generator set font-variant-ligatures. The legacy
no-common-ligatures rule on html/body/.baseType never reached these classes.

- Add `font-variant-ligatures: none;` to `generate-body-classes`
  (src/type/partials/_body.scss), covering `.body-*`.
- Add `font-variant-ligatures: none;` to `generate-fluid-type-classes`
  (src/type/mixins/_fluid-type.scss), covering `.display-*`, `.heading-*`,
  and `.accent-*`.
- Add tests/typeLigatures.spec.js regression coverage asserting the rule is
  emitted on every family, for both the CSS-variable and Alaska
  static-fallback generators.
- Regenerate committed dist bundles; the rule now applies across all themes
  (Alaska, Alaska Classic, Atmos, and Hawaiian/Chronicle Display).

Co-authored-by AI: Claude Opus 4.8
@jason-capsule42 jason-capsule42 self-assigned this Aug 19, 2026
@sourcery-ai

sourcery-ai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Reviewer's Guide

Disables all font ligatures across modern typography classes for every brand theme by updating the Sass generators, regenerating bundled CSS, and adding regression tests and documentation tied to ticket AB#1608258.

Flow diagram for ligature disabling across typography generators and themes

graph TD
  generate_body_classes[generate_body_classes mixin]
  generate_fluid_type_classes[generate_fluid_type_classes mixin]
  typography_classes[".body-*, .display-*, .heading-*, .accent-* classes (font-variant-ligatures: none)"]
  theme_bundles["Alaska, AlaskaClassic, Atmos, Hawaiian global CSS bundles"]
  typeLigatures_spec[typeLigatures_spec]
  test_runner[Test runner]

  generate_body_classes --> typography_classes
  generate_fluid_type_classes --> typography_classes
  typography_classes --> theme_bundles

  test_runner --> typeLigatures_spec
  typeLigatures_spec --> generate_body_classes
  typeLigatures_spec --> generate_fluid_type_classes
  typeLigatures_spec --> typography_classes
  typeLigatures_spec --> theme_bundles
Loading

File-Level Changes

Change Details Files
Disable ligatures on all generated typography classes across themes.
  • Add font-variant-ligatures: none to the generate-fluid-type-classes mixin so display, heading, and accent classes emit the rule for all themes and both CSS-variable and fallback branches.
  • Add font-variant-ligatures: none to the generate-body-classes mixin so all body-* classes emit the rule consistently.
  • Regenerate dist/bundled theme CSS (global and minified) and type class bundles so every shipped .body-, .display-, .heading-, and .accent- selector includes font-variant-ligatures: none.
src/type/mixins/_fluid-type.scss
src/type/partials/_body.scss
dist/bundled/themes/alaska-classic.global.css
dist/bundled/themes/alaska.global.css
dist/bundled/themes/atmos.global.css
dist/bundled/themes/hawaiian.global.css
dist/bundled/type/classes.alaska.css
dist/bundled/type/classes.css
dist/bundled/themes/alaska-classic.global.min.css
dist/bundled/themes/alaska.global.min.css
dist/bundled/themes/atmos.global.min.css
dist/bundled/themes/hawaiian.global.min.css
dist/bundled/type/classes.alaska.min.css
dist/bundled/type/classes.min.css
Add documentation and regression tests to prevent ligature settings from regressing.
  • Create a post-mortem document describing the ligature issue, root cause, fix, and learnings for ticket AB#1608258.
  • Add a Jest/Sass-based regression test that compiles the real type class generators (CSS-variable and Alaska fallback) and asserts font-variant-ligatures: none is emitted on all type families and that no ligature-enabling values appear.
docs/post-mortem/1608258.md
tests/typeLigatures.spec.js

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown

🚀 PR Release Published! v0.0.0-pr299.2

To install:

npm install @aurodesignsystem-dev/webcorestylesheets@0.0.0-pr299.2

Install via alias:

npm install @aurodesignsystem@npm:@aurodesignsystem-dev/webcorestylesheets@0.0.0-pr299.2

View on npmjs.com

@jason-capsule42 jason-capsule42 left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🤖 Claude Code Review — no blocking issues

The change adds font-variant-ligatures: none; to the two typography generator mixins, regenerates the committed dist/ bundles, and adds a compile-output regression test. No 🔴 blocking issues. The two suggestions below are optional polish.

Verified clean:

  • Source correctness — the rule is emitted first in each generated class block, outside the @if/@else font-family branches, so both the CSS-variable and static-fallback builds inherit it. No later declaration in the block (including accent's text-transform via @content) overrides a different property. Valid CSS3.
  • Test is not vacuoustests/typeLigatures.spec.js compiles the real generators for all 4 families (body, display, heading, accent) across both branches; the positive regex requires matches.length > 0, and the negative assertion does not false-match no-common-ligatures.
  • Dist is consistent with source — a clean 1:1 rule-to-class ratio (29:29) across classes.css, classes.alaska.css, and all 4 theme global bundles; no ligature-enabling value remains anywhere in dist/.

🎫 Ticket completeness — AB#1608258: The ADO work item has no Description/Acceptance Criteria populated, so completeness was judged from the post-mortem's enumerated requirements — 4 of 4 resolved (rule on .body/.display/.heading/.accent-*; applies to all themes; added to both generate-body-classes and generate-fluid-type-classes).

Commit & post-mortem: fix(type): is the correct Conventional Commit prefix for a compliance bug fix (PATCH); additive/non-breaking, so no BREAKING CHANGE. Post-mortem docs/post-mortem/1608258.md present and technically accurate; Discussion #298 in sync. No TRD linked (informational).

🤖 Multi-model: opus + sonnet, high effort. opus — clean pass (0 findings), actively dismissed the @content nit below. sonnet — the two optional nits below. Both models agree there are no blocking issues.

Comment thread src/type/mixins/_fluid-type.scss Outdated
Comment thread tests/typeLigatures.spec.js
@jason-capsule42
jason-capsule42 marked this pull request as ready for review August 20, 2026 00:53
@jason-capsule42
jason-capsule42 requested a review from a team as a code owner August 20, 2026 00:53

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry @jason-capsule42, your pull request is larger than the review limit of 150000 diff characters

@sun-mota

Copy link
Copy Markdown
Member

how do we disable the font ligature on b, strong? such as <div class="heading-xl"> ABC <b>EFG</b></div>

@jason-capsule42

Copy link
Copy Markdown
Member Author

how do we disable the font ligature on b, strong? such as <div class="heading-xl"> ABC <b>EFG</b></div>

The and tags nested will not over ride the parent typography class.

@chrisfalaska

Copy link
Copy Markdown
Contributor

There were three issues I noticed, listed below. I made the suggested changes in the cfriedberg/ligatures branch because it was quicker than providing suggestions directly in the PR.

Feel free to cherry-pick or merge, etc. I did not visually test them.

Observed issues

  • Conflicting ligature rules: The new typography classes used font-variant-ligatures: none, while the base styles still used the weaker no-common-ligatures, resulting in inconsistent behavior across the system.

    • Fix: Updated the base styles to use none as well, ensuring all typography consistently disables the full set of ligatures as required by the brand standard.
  • No true single source of truth: The none declaration was duplicated across multiple type generators, creating multiple places that would need to be maintained and could eventually drift apart.

    • Fix: Created a shared auro_noLigatures mixin and updated the type generators and base styles to use it. The ligature policy now lives in one place and is inherited by every relevant implementation.
  • Overly heavy/brittle testing: The test depended on the exact ordering of the generated CSS, meaning an unrelated declaration reorder could cause it to fail even when the ligature behavior remained correct.

    • Fix: Simplified the test to validate that the expected ligature rule is present without tying the assertion to its exact position in the generated CSS, keeping the guard focused on behavior rather than implementation order.

Why none instead of no-common-ligatures: no-common-ligatures only disables common ligatures, such as fi and fl, while other types—including discretionary, historical, and contextual ligatures—can still render. The brand requirement is to disable ligatures entirely, so none is the more accurate value.

  • Change: Replaced the existing no-common-ligatures rules with none and routed them through the shared auro_noLigatures mixin. This ensures the same complete ligature policy is applied consistently across both base styles and generated typography classes.

jason-capsule42 added a commit that referenced this pull request Aug 20, 2026
Base styles previously used the weaker `font-variant-ligatures: no-common-ligatures` (only common ligatures such as fi/fl), while the generated typography classes used `none`, producing inconsistent ligature behavior across the system. Alaska Air Group brand guidelines require ligatures disabled entirely, so `none` is the correct value.

- Add a shared `auro_noLigatures` mixin (src/utilityMixins/_noLigatures.scss) as the single source of truth for the brand ligature policy, replacing the value that was duplicated across the type generators and base styles.
- Route the fluid-type and body class generators, the base essentials rule, and the Auro Classic legacy base rule through the mixin; the base rules now emit `none` instead of `no-common-ligatures`.
- Simplify tests/typeLigatures.spec.js to assert the declaration is present within each generated class block rather than tied to its exact position, so an unrelated declaration reorder no longer breaks the guard.
- Regenerate committed dist bundles across all themes (Alaska, Alaska Classic, Atmos, Hawaiian) and legacy Auro Classic.

Co-authored-by AI: Claude Opus 4.8
@jason-capsule42

Copy link
Copy Markdown
Member Author

There were three issues I noticed, listed below. I made the suggested changes in the cfriedberg/ligatures branch because it was quicker than providing suggestions directly in the PR.

Feel free to cherry-pick or merge, etc. I did not visually test them.

Observed issues

  • Conflicting ligature rules: The new typography classes used font-variant-ligatures: none, while the base styles still used the weaker no-common-ligatures, resulting in inconsistent behavior across the system.

    • Fix: Updated the base styles to use none as well, ensuring all typography consistently disables the full set of ligatures as required by the brand standard.
  • No true single source of truth: The none declaration was duplicated across multiple type generators, creating multiple places that would need to be maintained and could eventually drift apart.

    • Fix: Created a shared auro_noLigatures mixin and updated the type generators and base styles to use it. The ligature policy now lives in one place and is inherited by every relevant implementation.
  • Overly heavy/brittle testing: The test depended on the exact ordering of the generated CSS, meaning an unrelated declaration reorder could cause it to fail even when the ligature behavior remained correct.

    • Fix: Simplified the test to validate that the expected ligature rule is present without tying the assertion to its exact position in the generated CSS, keeping the guard focused on behavior rather than implementation order.

Why none instead of no-common-ligatures: no-common-ligatures only disables common ligatures, such as fi and fl, while other types—including discretionary, historical, and contextual ligatures—can still render. The brand requirement is to disable ligatures entirely, so none is the more accurate value.

  • Change: Replaced the existing no-common-ligatures rules with none and routed them through the shared auro_noLigatures mixin. This ensures the same complete ligature policy is applied consistently across both base styles and generated typography classes.

Changes committed for these

@chrisfalaska chrisfalaska left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes look good! Just a bit of doc drift in the post-mortem. It should mention _noLigatures.scss and the base reconciliation.

Base styles previously used the weaker `font-variant-ligatures: no-common-ligatures` (only common ligatures such as fi/fl), while the generated typography classes used `none`, producing inconsistent ligature behavior across the system. Alaska Air Group brand guidelines require ligatures disabled entirely, so `none` is the correct value.

- Add a shared `auro_noLigatures` mixin (src/utilityMixins/_noLigatures.scss) as the single source of truth for the brand ligature policy, replacing the value that was duplicated across the type generators and base styles.
- Route the fluid-type and body class generators, the base essentials rule, and the Auro Classic legacy base rule through the mixin; the base rules now emit `none` instead of `no-common-ligatures`.
- Simplify tests/typeLigatures.spec.js to assert the declaration is present within each generated class block rather than tied to its exact position, so an unrelated declaration reorder no longer breaks the guard.
- Regenerate committed dist bundles across all themes (Alaska, Alaska Classic, Atmos, Hawaiian) and legacy Auro Classic.

Co-authored-by AI: Claude Opus 4.8
@jason-capsule42

Copy link
Copy Markdown
Member Author

Changes look good! Just a bit of doc drift in the post-mortem. It should mention _noLigatures.scss and the base reconciliation.

Resolved

@chrisfalaska chrisfalaska left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Feedback applied, looks great!

@jason-capsule42
jason-capsule42 merged commit 37d3182 into master Aug 20, 2026
7 checks passed
@jason-capsule42
jason-capsule42 deleted the jbaker/ligatureRemoval branch August 20, 2026 18:15
rmenner pushed a commit that referenced this pull request Aug 20, 2026
## [12.0.1](v12.0.0...v12.0.1) (2026-08-20)

### Bug Fixes

* **type:** disable all ligatures via shared auro_noLigatures mixin [#299](#299) ([37d3182](37d3182))
* **type:** disable font ligatures across all typography classes and themes AB[#1608258](https://github.com/AlaskaAirlines/WebCoreStyleSheets/issues/1608258) ([0fd7013](0fd7013))
@rmenner

rmenner commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 12.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@rmenner rmenner added the released Completed work has been released label Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Completed work has been released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants