Skip to content

Commit d3d1dc3

Browse files
authored
Merge pull request #135 from rootstrap/fix/set_nativewinds_rem_size_to_16
fix: set nativewind's rem size to 16
2 parents a27364b + 9c92fae commit d3d1dc3

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,6 @@
3030
"i18n-ally.disabled": false, // make sure to disable i18n-ally in your global setting and only enable it for such projects
3131
"tailwindCSS.experimental.classRegex": [
3232
["tv\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"]
33-
]
33+
],
34+
"tailwindCSS.rootFontSize": 16
3435
}

metro.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ const { withNativeWind } = require('nativewind/metro');
55

66
const config = getDefaultConfig(__dirname);
77

8-
module.exports = withNativeWind(config, { input: './global.css' });
8+
module.exports = withNativeWind(config, { input: './global.css', inlineRem: 16 });
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module.exports = {
1+
export default {
22
white: '#ffffff',
33
black: '#000000',
44
charcoal: {

src/components/ui/font-family.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default {
2+
inter: ['Inter'],
3+
};

tailwind.config.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const colors = require('./src/components/ui/colors');
2+
const fontFamily = require('./src/components/ui/font-family');
23

34
/** @type {import('tailwindcss').Config} */
45
module.exports = {
@@ -8,9 +9,7 @@ module.exports = {
89
darkMode: 'class',
910
theme: {
1011
extend: {
11-
fontFamily: {
12-
inter: ['Inter'],
13-
},
12+
fontFamily,
1413
colors,
1514
},
1615
},

0 commit comments

Comments
 (0)