Add/Update body type classes and CJK fonts#282
Merged
Conversation
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.
Reviewer's GuideIntroduces 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 mixinsclassDiagram
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
Class diagram for updated body typography configuration and CSS varsclassDiagram
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
Class diagram for Alaska theme CJK font coverage updateclassDiagram
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
Flow diagram for Hawaiian accent letter spacing controlflowchart 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]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
rmenner
approved these changes
May 1, 2026
Contributor
|
Republish since first release failed |
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- In
generate-body-classes, the fallback branch still usesauro_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 ingenerate-body-css-vars. - Now that
generate-fluid-type-classestakes a$use-letter-spacingflag 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.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
🚀 PR Release Published! To install: npm install @aurodesignsystem-dev/webcorestylesheets@0.0.0-pr282.0Install via alias: npm install @aurodesignsystem@npm:@aurodesignsystem-dev/webcorestylesheets@0.0.0-pr282.0 |
Contributor
|
🎉 This PR is included in version 11.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
Checklist:
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:
Enhancements: