Complete the code to add Tailwind's base styles to your CSS file.
@tailwind [1];The @tailwind base; directive includes Tailwind's base styles, which are essential for consistent styling.
Complete the code to enable purging unused CSS in Tailwind's config file.
module.exports = {
content: [[1]],
theme: {
extend: {},
},
plugins: [],
}The content array tells Tailwind where to look for class names to keep in the final CSS. Using "./src/**/*.{html,js}" targets all HTML and JS files in the source folder.
Fix the error in the Tailwind config to properly enable dark mode.
module.exports = {
darkMode: [1],
theme: {
extend: {},
},
plugins: [],
}Setting darkMode to "class" enables toggling dark mode by adding a dark class to the root element, which is the recommended approach for production.
Fill both blanks to configure Tailwind to remove unused styles and enable JIT mode.
module.exports = {
mode: [1],
purge: [[2]],
theme: {
extend: {},
},
plugins: [],
}Setting mode to "jit" enables Just-In-Time compilation for faster builds. Setting purge to ["./src/**/*.{html,js}"] configures Tailwind to scan source files for used classes, removing unused styles in production.
Fill all three blanks to create a responsive container with padding and center alignment using Tailwind classes.
<div class="[1] [2] [3]"> Content goes here </div>
The container class sets a max-width and centers content responsively. mx-auto centers the container horizontally by setting automatic margins. px-4 adds horizontal padding for spacing inside the container.