Built as a practice project to learn tailwind css following a tutorial on youtube by Brad Traversy.
Brad Traversy is the founder of Traversy media, a youtube channel that provides vast number of tutorials, crash courses and many more educational content focusing on web development.
The designs are from a frontend mentor challenge
Frontendmentor is a platform offering, some free and paywalled professional designs for frontend developers to create stunning projects.
View my list of all solved Frontementor challenges here
Follow these steps if you want to clone this and play around with the code.
pnpm i
if you want to use some other package manager like yarn or npm, delete thepnpm-lock.yaml
file before doing so.- Start tinkering.
pnpm init
pnpm i -D tailwindcss
pnpx tailwindcss init
>> produces tailwind config.- In tailwid config,
content: ["./*.html"]
which means all the html files in root dir are the ones where tailwind is being utilised. If there are some other paths where tailwind is being utilised add those to the array as well. - import tailwind
/* file: input.css */
@tailwind base;
@tailwind components;
@tailwind utilities;
- Create npm scripts to watch for changes, and for the build task.
"build":"tailwindcss -i ./input.css -o ./css/main.css"
"watch":"tailwindcss -i ./input.css -o ./css/main.css --watch"
- Tailwind CSS docs
- pnpm docs
- Guide for NPM scripts
- Crash course on Tailwind CSS by Brad Traversy on Youtube.