nativewind
nativewind copied to clipboard
[v4] hairlineWidth() and platformSelect() not working
Describe the bug
Using hairlineWidth() or platformSelect() on the tailwind config file doesn't work. Looks like it doesn't compute the function value and instead just use the function name as the css value (see below). It happens with both hairlineWidth and platformSelect but to be honest I haven't tested using the other functions so those might be broken as well.
tailwind config file
module.exports = {
content: [
"./app/**/*.{js,jsx,ts,tsx}",
"./components/**/*.{js,jsx,ts,tsx}",
"./modules/**/*.{js,jsx,ts,tsx}",
],
presets: [require("nativewind/preset")],
theme: {
extend: {
fontFamily: {
heading: ['"SF Pro Display"'],
body: ['"SF Pro Text"'],
mono: ['"SF Pro Text"'],
rounded: ['"SF Pro Rounded"'],
},
borderWidth: {
hairline: hairlineWidth(),
},
spacing: {
hairline: hairlineWidth(),
},
},
},
plugins: [],
};