File tree Expand file tree Collapse file tree 3 files changed +28
-10
lines changed Expand file tree Collapse file tree 3 files changed +28
-10
lines changed Original file line number Diff line number Diff line change 1
1
@import "tailwindcss/theme.css" layer(theme);
2
2
@import "tailwindcss/preflight.css" layer(base);
3
- @import "tailwindcss/utilities.css" ;
3
+ @import "tailwindcss/utilities.css" ;
4
+
5
+ @theme {
6
+ --text-xs--line-height : calc (1em / 0.75 );
7
+ --text-sm--line-height : calc (1.25em / 0.875 );
8
+ --text-base--line-height : calc (1.5em / 1 );
9
+ --text-lg--line-height : calc (1.75em / 1.125 );
10
+ --text-xl--line-height : calc (1.75em / 1.25 );
11
+ --text-2xl--line-height : calc (2em / 1.5 );
12
+ --text-3xl--line-height : calc (2.25em / 1.875 );
13
+ --text-4xl--line-height : calc (2.5em / 2.25 );
14
+
15
+ --leading-tight : 1.25em ;
16
+ --leading-snug : 1.375em ;
17
+ --leading-normal : 1.5em ;
18
+ --leading-relaxed : 1.625em ;
19
+ --leading-loose : 2em ;
20
+ }
Original file line number Diff line number Diff line change @@ -6,9 +6,7 @@ export default function App() {
6
6
return (
7
7
< >
8
8
< View className = "justify-center items-center h-full" >
9
- < Text className = "text-green-500 ring-2 ring-blue-500 shadow-xl shadow-red-500" >
10
- Test Component
11
- </ Text >
9
+ < Text className = "text-red-500" > Test Component</ Text >
12
10
</ View >
13
11
</ >
14
12
) ;
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ const propertyRename: Record<string, string> = {
57
57
"background-image" : "experimental_backgroundImage" ,
58
58
} ;
59
59
60
- const needsRuntimeParsing = new Set ( [
60
+ const unparsedRuntimeParsing = new Set ( [
61
61
"animation" ,
62
62
"text-shadow" ,
63
63
"transform" ,
@@ -811,7 +811,7 @@ export function parseDeclarationUnparsed(
811
811
/**
812
812
* Unparsed shorthand properties need to be parsed at runtime
813
813
*/
814
- if ( needsRuntimeParsing . has ( property ) ) {
814
+ if ( unparsedRuntimeParsing . has ( property ) ) {
815
815
const args = parseUnparsed ( declaration . value . value , builder ) ;
816
816
817
817
if ( property === "animation" ) {
@@ -829,10 +829,13 @@ export function parseDeclarationUnparsed(
829
829
] ) ;
830
830
}
831
831
} else {
832
- builder . addDescriptor (
833
- property ,
834
- parseUnparsed ( declaration . value . value , builder ) ,
835
- ) ;
832
+ const value = parseUnparsed ( declaration . value . value , builder ) ;
833
+
834
+ builder . addDescriptor ( property , value ) ;
835
+
836
+ if ( property === "font-size" ) {
837
+ builder . addDescriptor ( "--__rn-css-em" , value ) ;
838
+ }
836
839
}
837
840
}
838
841
You can’t perform that action at this time.
0 commit comments