Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
mimarz committed May 15, 2024
1 parent 8fce624 commit 38b9d3d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/cli/src/tokens/transformers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export const sizeRem: Transform = {
filter: (token) =>
['sizing', 'spacing'].includes(token.type as string) &&
!token.name.includes('base'),
transform: (token, options) => {
const baseFont = (options.basePxFontSize as unknown as number) || 16;
transform: (token, config) => {
const baseFont = (config.basePxFontSize as unknown as number) || 16;
const value = parseInt(token.value as string);

if (value === 0) {
Expand Down Expand Up @@ -48,7 +48,7 @@ export const typographyShorthand: Transform = {
const { usesDtcg } = options;
const typography = (usesDtcg ? token.$value : token.value) as Typgraphy;

const baseFontPx = (options.basePxFontSize as unknown as number) || 16;
const baseFontPx = (config.basePxFontSize as unknown as number) || 16;
const fontSize = `${parseInt(typography.fontSize) / baseFontPx}rem`;

return `${typography.fontWeight} ${fontSize}/${typography.lineHeight} '${typography.fontFamily}'`;
Expand Down

0 comments on commit 38b9d3d

Please sign in to comment.