P粉7920264672023-09-01 09:25:25
Tailwind does not include all utility classes in the output CSS file. Instead, it parses out the classes you use in your code during the build process and adds only those classes to the output file.
Therefore, if you add classes to your code, you need to re-run the build process, either manually or by including the --watch
option in the build command. For example:
npx tailwindcss -i ./src/input.css -o ./dist/output.css --watch
Note: This is also why adding a previously unused utility class in the DOM inspector of the browser development tools does not immediately affect the page elements.