Skip to content

Add/Update body type classes and CJK fonts#282

Merged
rmenner merged 11 commits into
masterfrom
jjones/wcssChangeRequest/#269
May 1, 2026
Merged

Add/Update body type classes and CJK fonts#282
rmenner merged 11 commits into
masterfrom
jjones/wcssChangeRequest/#269

Conversation

@jordanjones243
Copy link
Copy Markdown
Contributor

@jordanjones243 jordanjones243 commented May 1, 2026

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: #269, #272

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

Introduce emphasized body text variants, refine typography configuration across themes, and update font and token dependencies for improved internationalization and Hawaiian accent styling.

New Features:

  • Add emphasized body text size variants across themes for more flexible emphasis styling.
  • Register medium-weight CJK (Japanese and Korean) font faces for the Alaska font theme.

Enhancements:

  • Move body font weight from a global setting to per-size configuration to better support emphasized variants.
  • Allow accent typography classes to optionally omit letter-spacing and disable accent letter-spacing for the Hawaiian theme.
  • Adjust heading font weights for Alaska and Hawaiian themes to align with updated design specifications.
  • Extend fluid type and theme generator mixins to support optional letter-spacing handling for accent typography.
  • Update generated documentation to version 10.1.4 and reflect the new build output.
  • Bump @aurodesignsystem/design-tokens dependency to the latest compatible 8.x version and align postinstall messaging with the runtime dependency.

jordanjones243 and others added 11 commits October 27, 2025 14:37
BREAKING CHANGE: The letter-spacing rule is now omitted from the Hawaiian theme `accent` classes.
…rameter

Surface accent letter-spacing intent at the theme call site instead of
inferring it from the accent-config 2xl entry. The inference was brittle:
a future theme defining letter-spacing on some sizes but not 2xl would
have been miscategorized for the entire accent group.
The per-size guard on var emission and the theme-level $use-letter-spacing
flag on class emission were two independent gates that could disagree. A
mixed config could produce a class referencing an undefined var, causing
letter-spacing to resolve to unset rather than inherit. Make the theme
flag the single source of truth.
…cope

The mixin name suggests it covers all four type categories, but the
$use-letter-spacing parameter only ever flowed to generate-accent-classes.
Rename to $accent-use-letter-spacing so the scope is visible at the call
site without stepping into the mixin body.
@jordanjones243 jordanjones243 self-assigned this May 1, 2026
@jordanjones243 jordanjones243 requested a review from a team as a code owner May 1, 2026 19:24
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented May 1, 2026

Reviewer's Guide

Introduces emphasized body typography size variants with per-size font weights across themes, adds optional letter-spacing control for accent and fluid type mixins (used to disable accent letter-spacing in the Hawaiian theme), adjusts certain heading weights, extends Alaska theme CJK font coverage to include medium weights, and updates documentation and design-token dependency metadata for the new release.

Class diagram for updated typography theme and type generator mixins

classDiagram

class generate_theme_mixin {
  +generate_theme(theme_name, body_config, display_config, heading_config, accent_config, accent_uses_letter_spacing)
}

class generate_theme_type_classes_mixin {
  +generate_theme_type_classes(use_fallback, fallback_configs, accent_use_letter_spacing)
}

class generate_fluid_type_classes_mixin {
  +generate_fluid_type_classes(type_name, sizes, use_fallback, fallback_config, use_letter_spacing)
}

class generate_accent_classes_mixin {
  +generate_accent_classes(use_fallback, fallback_config, use_letter_spacing)
}

class generate_body_classes_mixin {
  +generate_body_classes(use_fallback, fallback_config)
}

class generate_display_classes_mixin {
  +generate_display_classes(use_fallback, fallback_config)
}

class generate_heading_classes_mixin {
  +generate_heading_classes(use_fallback, fallback_config)
}

class theme_configs_map {
  body
  display
  heading
  accent
}

generate_theme_mixin --> theme_configs_map : builds
generate_theme_mixin --> generate_theme_type_classes_mixin : calls

generate_theme_type_classes_mixin --> generate_body_classes_mixin : calls
generate_theme_type_classes_mixin --> generate_display_classes_mixin : calls
generate_theme_type_classes_mixin --> generate_heading_classes_mixin : calls
generate_theme_type_classes_mixin --> generate_accent_classes_mixin : calls with accent_use_letter_spacing

generate_accent_classes_mixin --> generate_fluid_type_classes_mixin : calls with use_letter_spacing
Loading

Class diagram for updated body typography configuration and CSS vars

classDiagram

class body_config_map {
  family
  familyFallback
  letter_spacing
  sizes
}

class body_size_variant_default {
  font_size
  line_height
  weight
}

class body_size_variant_default_emphasized {
  font_size
  line_height
  weight
}

class body_size_variant_lg {
  font_size
  line_height
  weight
}

class body_size_variant_lg_emphasized {
  font_size
  line_height
  weight
}

class body_size_variant_sm {
  font_size
  line_height
  weight
}

class body_size_variant_sm_emphasized {
  font_size
  line_height
  weight
}

class body_size_variant_xs {
  font_size
  line_height
  weight
}

class body_size_variant_xs_emphasized {
  font_size
  line_height
  weight
}

class body_size_variant_2xs {
  font_size
  line_height
  weight
}

class body_size_variant_2xs_emphasized {
  font_size
  line_height
  weight
}

class generate_body_css_vars_mixin {
  +generate_body_css_vars(theme_config)
}

body_config_map --> body_size_variant_default : sizes default
body_config_map --> body_size_variant_default_emphasized : sizes default_emphasized
body_config_map --> body_size_variant_lg : sizes lg
body_config_map --> body_size_variant_lg_emphasized : sizes lg_emphasized
body_config_map --> body_size_variant_sm : sizes sm
body_config_map --> body_size_variant_sm_emphasized : sizes sm_emphasized
body_config_map --> body_size_variant_xs : sizes xs
body_config_map --> body_size_variant_xs_emphasized : sizes xs_emphasized
body_config_map --> body_size_variant_2xs : sizes 2xs
body_config_map --> body_size_variant_2xs_emphasized : sizes 2xs_emphasized

generate_body_css_vars_mixin --> body_config_map : reads
Loading

Class diagram for Alaska theme CJK font coverage update

classDiagram

class alaska_font_theme_mixin {
  +define_alaska_fonts()
}

class font_face_i18n_mixin {
  +font_face_i18n(family, weight, src_path, unicode_range)
}

class cjk_font_paths {
  i18n_font_jp_300_path
  i18n_font_jp_400_path
  i18n_font_jp_500_path
  i18n_font_kr_300_path
  i18n_font_kr_400_path
  i18n_font_kr_500_path
}

class font_weights_tokens {
  ds_type_weight_light
  ds_type_weight_book
  ds_type_weight_medium
  ds_type_weight_cond_news
  ds_type_weight_cond_medium
}

alaska_font_theme_mixin --> font_face_i18n_mixin : uses
alaska_font_theme_mixin --> cjk_font_paths : references
alaska_font_theme_mixin --> font_weights_tokens : references
Loading

Flow diagram for Hawaiian accent letter spacing control

flowchart TD

  A_start[Start Hawaiian theme generation] --> B_generate_theme[Call generate_theme with accent_uses_letter_spacing false]
  B_generate_theme --> C_build_configs[Build theme_configs_map for body, display, heading, accent]
  C_build_configs --> D_generate_type_classes[Call generate_theme_type_classes with accent_use_letter_spacing false]
  D_generate_type_classes --> E_generate_accent_classes[Call generate_accent_classes with use_letter_spacing false]
  E_generate_accent_classes --> F_generate_fluid_type_classes[Call generate_fluid_type_classes for accent with use_letter_spacing false]
  F_generate_fluid_type_classes --> G_skip_letter_spacing[Do not output accent letter_spacing declarations]
  G_skip_letter_spacing --> H_end[End Hawaiian accent class generation]
Loading

File-Level Changes

Change Details Files
Add emphasized body text variants and move body font weight to be size-specific across all themes, updating generated CSS variables and classes accordingly.
  • Extend body size map to include '-emphasized' variants for each base size in all theme body configs.
  • Add per-size 'weight' entries inside each body size definition instead of a single global body weight.
  • Generate per-size CSS custom properties for body font weight and wire body class mixins to use size-specific weight variables in both normal and fallback paths.
src/config/alaska-classic/type/body.scss
src/config/alaska/type/body.scss
src/config/auro-1/type/body.scss
src/config/auro-2/type/body.scss
src/config/hawaiian/type/body.scss
src/type/partials/_body.scss
Make fluid type and accent type generation aware of optional letter-spacing and disable accent letter-spacing for the Hawaiian theme.
  • Add a 'use-letter-spacing' flag to the fluid type class generator mixin to optionally skip letter-spacing declarations for a type.
  • Thread an 'accent-uses-letter-spacing' parameter through the theme and type class generator mixins to control accent letter-spacing behavior per theme.
  • Update the accent class mixin to accept and pass through the new letter-spacing flag and configure the Hawaiian theme to generate accent classes without letter-spacing.
  • Remove letter-spacing values from the Hawaiian accent type config now that letter-spacing is handled conditionally by the generator mixins.
src/type/mixins/_fluid-type.scss
src/type/mixins/_theme-generator.scss
src/type/mixins/_type-generator.scss
src/type/partials/_accent.scss
src/type/themes/hawaiian/index.scss
src/config/hawaiian/type/accent.scss
Adjust heading font weights for select sizes in the Alaska and Hawaiian heading configs to better align with design intent.
  • Change small Alaska heading sizes to use the primary heading weight token instead of the secondary heading weight token.
  • Change large Hawaiian heading sizes to use the secondary heading weight token instead of the primary heading weight token.
src/config/alaska/type/heading.scss
src/config/hawaiian/type/heading.scss
Expand Alaska theme CJK font-face coverage by adding medium-weight Japanese and Korean mappings for the primary brand family.
  • Add medium-weight Japanese font-face mapping for the primary brand font family using the 500-weight Japanese CJK font path.
  • Add medium-weight Korean font-face mapping for the primary brand font family using the 500-weight Korean CJK font path.
src/fonts/themes/_alaska.scss
Update package metadata, postinstall messaging, and generated docs to match the new release and design token dependency version.
  • Bump the design tokens dependency to a newer compatible range in package metadata.
  • Change the postinstall script to read the required design tokens version from dependencies instead of peerDependencies for its console message.
  • Regenerate SassDoc HTML to reflect the new library version number in the documentation UI and footer.
package.json
package-lock.json
packageScripts/postinstall.mjs
docs/index.html

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

@rmenner
Copy link
Copy Markdown
Contributor

rmenner commented May 1, 2026

Republish since first release failed

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • In generate-body-classes, the fallback branch still uses auro_map-deep-get($fallback-config, 'weight') instead of a size-specific lookup, which means emphasized body sizes won’t get their per-size weights when a fallback theme is used; consider mirroring the per-size weight access you added in generate-body-css-vars.
  • Now that generate-fluid-type-classes takes a $use-letter-spacing flag and you’ve wired it through for accent, consider whether body/display/heading should also expose this control (or explicitly document why they always use letter-spacing) for consistency across type categories.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In `generate-body-classes`, the fallback branch still uses `auro_map-deep-get($fallback-config, 'weight')` instead of a size-specific lookup, which means emphasized body sizes won’t get their per-size weights when a fallback theme is used; consider mirroring the per-size weight access you added in `generate-body-css-vars`.
- Now that `generate-fluid-type-classes` takes a `$use-letter-spacing` flag and you’ve wired it through for accent, consider whether body/display/heading should also expose this control (or explicitly document why they always use letter-spacing) for consistency across type categories.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

🚀 PR Release Published! v0.0.0-pr282.0

To install:

npm install @aurodesignsystem-dev/webcorestylesheets@0.0.0-pr282.0

Install via alias:

npm install @aurodesignsystem@npm:@aurodesignsystem-dev/webcorestylesheets@0.0.0-pr282.0

View on npmjs.com

@rmenner rmenner merged commit 7e7b4ce into master May 1, 2026
14 of 15 checks passed
@rmenner rmenner deleted the jjones/wcssChangeRequest/#269 branch May 1, 2026 19:26
@rmenner
Copy link
Copy Markdown
Contributor

rmenner commented May 1, 2026

🎉 This PR is included in version 11.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@rmenner rmenner added the released Completed work has been released label May 1, 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.

3 participants