Skip to content

Commit

Permalink
Android: force em values to use the X.em format (#104)
Browse files Browse the repository at this point in the history
* Android: force `em` values to use the `X.em` format by removing the `ts/resolveMath` transform.
  • Loading branch information
jmartinesp authored Jul 31, 2024
1 parent 882ff6d commit 2af7bb5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
16 changes: 8 additions & 8 deletions assets/android/src/TypographyTokens.kt
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ object TypographyTokens {
fontWeight = FontWeight.W700,
lineHeight = 34.sp,
fontSize = 28.sp,
letterSpacing = 0em,
letterSpacing = 0.em,
platformStyle = PlatformTextStyle(includeFontPadding = false),
lineHeightStyle = LineHeightStyle(LineHeightStyle.Alignment.Center, LineHeightStyle.Trim.None)
)
Expand All @@ -121,7 +121,7 @@ object TypographyTokens {
fontWeight = FontWeight.W400,
lineHeight = 34.sp,
fontSize = 28.sp,
letterSpacing = 0em,
letterSpacing = 0.em,
platformStyle = PlatformTextStyle(includeFontPadding = false),
lineHeightStyle = LineHeightStyle(LineHeightStyle.Alignment.Center, LineHeightStyle.Trim.None)
)
Expand All @@ -130,7 +130,7 @@ object TypographyTokens {
fontWeight = FontWeight.W700,
lineHeight = 27.sp,
fontSize = 22.sp,
letterSpacing = 0em,
letterSpacing = 0.em,
platformStyle = PlatformTextStyle(includeFontPadding = false),
lineHeightStyle = LineHeightStyle(LineHeightStyle.Alignment.Center, LineHeightStyle.Trim.None)
)
Expand All @@ -139,7 +139,7 @@ object TypographyTokens {
fontWeight = FontWeight.W400,
lineHeight = 27.sp,
fontSize = 22.sp,
letterSpacing = 0em,
letterSpacing = 0.em,
platformStyle = PlatformTextStyle(includeFontPadding = false),
lineHeightStyle = LineHeightStyle(LineHeightStyle.Alignment.Center, LineHeightStyle.Trim.None)
)
Expand All @@ -148,7 +148,7 @@ object TypographyTokens {
fontWeight = FontWeight.W500,
lineHeight = 25.sp,
fontSize = 20.sp,
letterSpacing = 0em,
letterSpacing = 0.em,
platformStyle = PlatformTextStyle(includeFontPadding = false),
lineHeightStyle = LineHeightStyle(LineHeightStyle.Alignment.Center, LineHeightStyle.Trim.None)
)
Expand All @@ -157,7 +157,7 @@ object TypographyTokens {
fontWeight = FontWeight.W400,
lineHeight = 25.sp,
fontSize = 20.sp,
letterSpacing = 0em,
letterSpacing = 0.em,
platformStyle = PlatformTextStyle(includeFontPadding = false),
lineHeightStyle = LineHeightStyle(LineHeightStyle.Alignment.Center, LineHeightStyle.Trim.None)
)
Expand All @@ -166,7 +166,7 @@ object TypographyTokens {
fontWeight = FontWeight.W700,
lineHeight = 41.sp,
fontSize = 34.sp,
letterSpacing = 0em,
letterSpacing = 0.em,
platformStyle = PlatformTextStyle(includeFontPadding = false),
lineHeightStyle = LineHeightStyle(LineHeightStyle.Alignment.Center, LineHeightStyle.Trim.None)
)
Expand All @@ -175,7 +175,7 @@ object TypographyTokens {
fontWeight = FontWeight.W400,
lineHeight = 41.sp,
fontSize = 34.sp,
letterSpacing = 0em,
letterSpacing = 0.em,
platformStyle = PlatformTextStyle(includeFontPadding = false),
lineHeightStyle = LineHeightStyle(LineHeightStyle.Alignment.Center, LineHeightStyle.Trim.None)
)
Expand Down
1 change: 0 additions & 1 deletion src/configs/getAndroidConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ export function getCommonAndroidConfig(): PlatformConfig {
return {
transforms: [
"camelCaseDecimal",
"ts/resolveMath",
"attribute/cti",
"kotlin/fontWeight",
"kotlin/literal",
Expand Down

0 comments on commit 2af7bb5

Please sign in to comment.