Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: adopt DTCG format, fix color scales, add build:watch, update typography tokens #24

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

adamstankiewicz
Copy link
Member

@adamstankiewicz adamstankiewicz commented Sep 1, 2024

Note: Accounts for changes to Paragon alpha in related PRs:

Figma

Paragon Elm Theme

Changes

  • Begins updating tokens' JSON schema to reflect the Design Tokens Community Group (DTCG) format, now that style-dictionary officially supports it. This involves migrating value -> $value, type -> $type, etc.
  • Adds build:watch NPM script.
  • Updates tokens/src/core/global/typography.json to reflect updates to upstream typography tokens, including ensuring the font size scale for display 1-4 works on mobile type.
  • Updates all global color scales to reflect current Elm theme and resolves color-related style bugs.
    • Now only includes a base accent-a and accent-b, despite a scale being depicted in Elm theme Figma. The upstream Paragon design system does not have a level scale (100-900) for accent-a and accent-b, so the elm-theme tokens are now updated to match.
  • Fix grid gutter width to be the expected value of 24px, resolving a style regression.

Screenshots

Color swatches from Paragon docs site

image

Updated support for mobile-specific sizes per display level 1-4

image

"paragon:help": "paragon help"
},
"devDependencies": {
"@openedx/paragon": "22.0.0-alpha.25"
"@openedx/paragon": "file:../paragon/openedx-paragon-20.18.1.tgz",
Copy link
Member Author

Choose a reason for hiding this comment

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

[inform] Requires changes that are under review in Paragon alpha. Using local package for now via npm pack.

@@ -19,9 +19,11 @@
"build-tokens": "paragon build-tokens --source ./tokens/src --build-dir ./paragon/css --source-tokens-only",
"build-scss": "paragon build-scss --corePath ./paragon/core.scss --themesPath ./paragon/css/themes --defaultThemeVariants light",
"build": "make build",
"build:watch": "nodemon --ignore dist -x \"make build\"",
Copy link
Member Author

Choose a reason for hiding this comment

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

Running npm run build:watch will automatically re-build the tokens/theme, resulting in updated dist output on updates to files. Useful when referencing the locally built files from Paragon during local development, or just more streamlined rapid development.

@adamstankiewicz adamstankiewicz force-pushed the ags/tokens-updates branch 2 times, most recently from 0f0c67e to 3022751 Compare September 1, 2024 18:59
@adamstankiewicz adamstankiewicz changed the title fix: correct color scales fix: adopt DTCG format, fix color scales, add build:watch, update typography tokens Sep 1, 2024
@adamstankiewicz adamstankiewicz force-pushed the ags/tokens-updates branch 6 times, most recently from e09263d to dd4cf7b Compare September 2, 2024 00:28
@adamstankiewicz adamstankiewicz force-pushed the ags/tokens-updates branch 8 times, most recently from bbe3716 to 67b862b Compare September 8, 2024 13:45
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.

1 participant