In this scenario, you are extending the default config, which means the new font family utility classes alongside the default font classes ( sans, serif and mono). The "extend" functionality allows you to add your font(s) alongside the existing font utilities.Īdd a section to your Tailwind config as follows: /* In your */ Option 2: Add it as an additional utility class Note: The default sans, serif or mono classes will not be created as you have not specified them in the config. * Generated by Tailwind CSS in your css file */ This will generate the following font- utility which you can use within your page (e.g. 'MyFont': // Ensure fonts with spaces have " " surrounding it. Option 1: Replace the default font utility classes with your ownĪdd your font(s) in the theme.fontFamily section of your Tailwind config as follows: /* In your */ Then you have three methods for adding the font. The first step is to load in your web font into the section of your page url('')
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |