nativewind icon indicating copy to clipboard operation
nativewind copied to clipboard

[v4] hairlineWidth() and platformSelect() not working

Open focux opened this issue 1 year ago • 0 comments

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.

image
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: [],
};

focux avatar Jun 28 '24 22:06 focux