Tailwind CSS Assignment-3
Basic Questions
- Create a responsive heading: text-2xl sm:text-3xl md:text-5xl.
- Style a button with hover:bg-green-600 and active:bg-green-800.
- Add focus:ring-2 focus:ring-blue-400 to an input.
- Make text gray in light mode but white in dark mode using dark:text-white.
- Create a sticky navbar using sticky top-0 bg-gray-900.
- Use absolute to position a badge at the top-right corner of a card.
- Create a footer fixed at the bottom using fixed bottom-0 w-full bg-black.
- Build a responsive grid: grid-cols-1 md:grid-cols-3.
- Create a div with w-40 h-40 bg-blue-500 hover:scale-110 transition.
- Add hover:rotate-12 effect to an image.
- Create a button with disabled:opacity-50 and disabled:cursor-not-allowed.
- Use hover:skew-y-6 on a card element.
- Add smooth transition: transition duration-500 ease-in-out.
- Create a responsive sidebar: hidden md:block w-64 bg-gray-800.
- Add hover:underline and focus:text-red-500 to a link.
- Build relative parent with absolute child placed at bottom-left corner.
- Create button with px-6 py-2 bg-indigo-500 text-white hover:scale-105.
- Add animation animate-ping to a notification dot.
- Create hover:shadow-xl card with rounded-lg.
- Build flex flex-col sm:flex-row gap-6 layout.
Intermediate Questions
- Make a responsive hero section: min-h-screen flex flex-col md:flex-row items-center.
- Create dark mode toggle button using dark:bg-gray-900 dark:text-white.
- Build grid with grid-cols-2 md:grid-cols-4 lg:grid-cols-6 gap-4.
- Use hover:translate-y-2 transition ease-out duration-300 on a card.
- Create button with focus:outline-none focus:ring-4 focus:ring-purple-400.
- Add active:scale-95 effect when button is pressed.
- Build sticky header with sticky top-0 z-50 shadow bg-white.
- Add hover:rotate-180 transform duration-700 on an icon.
- Create a profile card with hover:shadow-lg transition ease-in-out.
- Build relative container with absolutely positioned floating button.
- Apply hover:skew-x-3 hover:scale-105 together on an image.
- Create grid with one element spanning col-span-2 md:col-span-4.
- Build responsive layout flex-col md:flex-row justify-between.
- Add dark mode specific border: dark:border-gray-700.
- Use hover:opacity-80 focus:opacity-100 for image hover effect.
- Build card flip using transform rotate-y-180 hover:rotate-0.
- Add hover:translate-x-6 animation to a button.
- Create responsive footer: grid-cols-1 sm:grid-cols-2 lg:grid-cols-4.
- Apply hover:shadow-2xl transition-all duration-500 to a card.
- Add plugin @tailwindcss/line-clamp and clamp text to 2 lines.
Advanced Questions
- Extend Tailwind config to add custom color “brandBlue:#1DA1F2” and use it in a button.
- Add custom spacing scale 72:18rem in tailwind.config.js and apply to padding.
- Extend Tailwind config with custom font “Poppins” and apply globally.
- Create custom animation “wiggle” in config and apply to a button.
- Use typography plugin to style article text with prose lg:prose-xl.
- Use forms plugin to style input with Tailwind form utilities.
- Create custom utility in @layer utilities to add text-shadow.
- Build responsive card with custom breakpoints added in config.
- Add plugin @tailwindcss/aspect-ratio to make a responsive video container.
- Build responsive dashboard layout with custom plugin + dark mode toggle.