-
Notifications
You must be signed in to change notification settings - Fork 8
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
Filter typography tokens from all.css output #377
base: beta
Are you sure you want to change the base?
Filter typography tokens from all.css output #377
Conversation
import { CssProperty } from "../../css-parser/css-parser.types"; | ||
import { Decorator } from "../decorator"; | ||
|
||
export class FilterTypographyTokens extends Decorator { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm also adding renaming of the tokens so that there is an actual smooth transition possible from frozenproduct to product.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is done now. However I also added a sanity check given the assumption that's been made that each token has a mirror adaptive/responsive token. This doesn't appear to be 100% true currently, but could be a config issue. This is why the CI build is currently failing.
The default output exposes both responsive typography tokens (which use the css clamp function) and adaptive typography tokens which are amended based on a media query. The reason that both tokens are needed is due to Figma not currently supporting the
clamp
function. Therefore, both types are being exposed as tokens with the advise given that even though Figma is using the adaptive tokens, going forward we should use the responsive tokens.This change adds a token formatter which:
product
andmarketing
contextsfrozenproduct
context.frozenproduct
usage so there is a direct migration path from thefrozenproduct
context to theproduct
context.This change takes the product output down from 2249 total lines to 2107 removing 142 lines (~6%).
Additionally,
BrandTokens
has been renamed to the more correctContextTokens
terminology.