Complete the code to include Tailwind CSS in your HTML file.
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@3.4.0/dist/tailwind.min.css" rel="[1]">
The rel attribute should be set to stylesheet to link the Tailwind CSS file properly.
Complete the Tailwind config to enable purging unused CSS from the src folder.
module.exports = {
content: ["[1]/**/*.html"],
theme: {
extend: {},
},
plugins: [],
}The content array tells Tailwind where to look for class names to keep. Usually, your source files are in the src folder.
Fix the error in the Tailwind build script to generate the CSS file with purging.
"build:css": "tailwindcss -i ./[1]/input.css -o ./dist/output.css --minify"
The input CSS file is usually inside the src folder, so the path should be ./src/input.css.
Fill both blanks to create a minimal Tailwind CSS file that imports base styles and components.
@tailwind [1]; @tailwind [2]; @tailwind utilities;
The three main layers in Tailwind CSS are base, components, and utilities. Here, you import base and components first, then utilities.
Fill all three blanks to create a dictionary comprehension that extracts critical CSS classes from a list of classes with length greater than 5.
critical_css = {cls: len(cls)[1] 2 for cls in classes if len(cls) [2] [3]This comprehension squares the length of each class name (using ** 2) and filters only those with length greater than 5.