nativewind icon indicating copy to clipboard operation
nativewind copied to clipboard

fontSize configuration customizations not respected.

Open z1haze opened this issue 1 year ago • 2 comments

Describe the bug When overriding the fontSize when extending the theme, the changes are not respected, despite intellisense reading the correct updated values:

To Reproduce Steps to reproduce the behavior:

  1. modify your tailwindcss config to change the fontSize for a particular text class.. see my example:
module.exports = {
  content: ['./src/App.{js,jsx,ts,tsx}', './src/**/*.{js,jsx,ts,tsx}'],
  theme: {
    extend: {
      fontSize: {
        '3xl': ['30px', {lineHeight: '40px'}]
      },
    }
  },
  plugins: []
};
  1. Restart your project, observe your intellisense to appear updated with the correct expected values: image
  2. Observe that the font size or line height changes from the config are not respected. image

Expected behavior Overrides made to the tailwindcss config (as per the documentation claiming they are the same) should be respected

Expo Snack Unable to get tailwindcss 3.3.2 to install in snack therefore cannot show. however this is the snack I attempted to produce https://snack.expo.dev/@shendricks-tillys/hello-world

z1haze avatar Jan 12 '24 18:01 z1haze

related to #404 however not the same

z1haze avatar Jan 12 '24 18:01 z1haze

@z1haze I was able to see fontSize config customizations work with [email protected] + [email protected]. I'm using Expo Router so I followed these docs to get things setup. Then I added your customizations just as you described above and it worked.

klcantrell avatar Jan 17 '24 02:01 klcantrell

This appears fixed in the v4 release

marklawlor avatar Feb 14 '24 07:02 marklawlor