Files
g11-m3/g11-m3-m3/Lesson 3_ Tailwind CSS - Utility-First Framework.html
2026-01-27 15:15:54 +03:00

793 lines
45 KiB
HTML

<!DOCTYPE html>
<!-- saved from url=(0063)file:///Users/home/Downloads/deepseek_html_20260113_2ad344.html -->
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Lesson 3: Tailwind CSS - Utility-First Framework</title>
<script src="./Lesson 3_ Tailwind CSS - Utility-First Framework_files/saved_resource"></script>
<style>
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
color: #333;
min-height: 100vh;
padding: 20px;
}
.presentation {
max-width: 1200px;
margin: 0 auto;
background: white;
border-radius: 15px;
overflow: hidden;
box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.slide {
display: none;
padding: 40px;
min-height: 600px;
}
.slide.active {
display: block;
}
.slide-header {
text-align: center;
margin-bottom: 30px;
padding-bottom: 20px;
border-bottom: 3px solid #f0f0f0;
}
.pedagogical-section {
background: #f8f9fa;
padding: 25px;
border-radius: 10px;
margin: 20px 0;
border-left: 4px solid #0ea5e9;
}
.pedagogical-section h3 {
color: #1e40af;
margin-top: 0;
margin-bottom: 15px;
font-size: 1.4rem;
}
.code-comparison {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20px;
margin: 25px 0;
}
.code-block {
background: #1f2937;
color: #f8fafc;
padding: 20px;
border-radius: 8px;
font-family: 'Consolas', monospace;
font-size: 0.9rem;
line-height: 1.5;
overflow-x: auto;
border: 1px solid #374151;
}
.live-editor {
background: #f8fafc;
padding: 25px;
border-radius: 10px;
margin: 25px 0;
border: 2px solid #e2e8f0;
}
.editor-container {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20px;
margin-top: 20px;
}
textarea {
width: 100%;
min-height: 200px;
padding: 15px;
border: 1px solid #cbd5e1;
border-radius: 6px;
font-family: 'Consolas', monospace;
font-size: 0.9rem;
background: #1f2937;
color: #f8fafc;
resize: vertical;
}
.preview {
background: white;
padding: 20px;
border-radius: 6px;
border: 1px solid #cbd5e1;
min-height: 200px;
}
.student-activity {
background: #fff7ed;
padding: 25px;
border-radius: 10px;
margin: 30px 0;
border-left: 4px solid #f59e0b;
}
.nav-controls {
display: flex;
justify-content: space-between;
padding: 20px 40px;
background: #f8fafc;
border-top: 2px solid #e2e8f0;
}
button {
background: #0ea5e9;
color: white;
border: none;
padding: 12px 25px;
border-radius: 6px;
cursor: pointer;
font-size: 1rem;
font-weight: 600;
transition: background-color 0.3s;
}
button:hover {
background: #0284c7;
}
button:disabled {
background: #94a3b8;
cursor: not-allowed;
}
.slide-counter {
color: #475569;
font-weight: 600;
}
.utility-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
gap: 15px;
margin: 20px 0;
}
.utility-card {
background: white;
padding: 15px;
border-radius: 8px;
border: 1px solid #e2e8f0;
text-align: center;
transition: transform 0.2s;
}
.utility-card:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.comparison-pros {
margin-top: 15px;
padding: 15px;
border-radius: 6px;
font-size: 0.9rem;
}
@media (max-width: 768px) {
.code-comparison, .editor-container {
grid-template-columns: 1fr;
}
.slide {
padding: 20px;
}
.utility-grid {
grid-template-columns: 1fr;
}
}
</style>
<style>*, ::before, ::after{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/* ! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com */*,::after,::before{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}::after,::before{--tw-content:''}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.mb-1{margin-bottom:0.25rem}.mb-2{margin-bottom:0.5rem}.mb-3{margin-bottom:0.75rem}.mb-4{margin-bottom:1rem}.mr-2{margin-right:0.5rem}.mt-1{margin-top:0.25rem}.mt-2{margin-top:0.5rem}.mt-3{margin-top:0.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.h-6{height:1.5rem}.min-h-40{min-height:10rem}.w-6{width:1.5rem}.w-full{width:100%}.flex-shrink-0{flex-shrink:0}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1, minmax(0, 1fr))}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-center{justify-content:center}.gap-4{gap:1rem}.space-x-4 > :not([hidden]) ~ :not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-6 > :not([hidden]) ~ :not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1.5rem * var(--tw-space-x-reverse));margin-left:calc(1.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1 > :not([hidden]) ~ :not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0.25rem * var(--tw-space-y-reverse))}.space-y-2 > :not([hidden]) ~ :not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0.5rem * var(--tw-space-y-reverse))}.space-y-3 > :not([hidden]) ~ :not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0.75rem * var(--tw-space-y-reverse))}.space-y-4 > :not([hidden]) ~ :not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.rounded{border-radius:0.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:0.5rem}.rounded-xl{border-radius:0.75rem}.border{border-width:1px}.border-2{border-width:2px}.border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.border-indigo-200{--tw-border-opacity:1;border-color:rgb(199 210 254 / var(--tw-border-opacity, 1))}.border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-sky-200{--tw-border-opacity:1;border-color:rgb(186 230 253 / var(--tw-border-opacity, 1))}.bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-emerald-50{--tw-bg-opacity:1;background-color:rgb(236 253 245 / var(--tw-bg-opacity, 1))}.bg-emerald-500{--tw-bg-opacity:1;background-color:rgb(16 185 129 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-green-600{--tw-bg-opacity:1;background-color:rgb(22 163 74 / var(--tw-bg-opacity, 1))}.bg-indigo-50{--tw-bg-opacity:1;background-color:rgb(238 242 255 / var(--tw-bg-opacity, 1))}.bg-indigo-600{--tw-bg-opacity:1;background-color:rgb(79 70 229 / var(--tw-bg-opacity, 1))}.bg-sky-50{--tw-bg-opacity:1;background-color:rgb(240 249 255 / var(--tw-bg-opacity, 1))}.p-3{padding:0.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-1{padding-left:0.25rem;padding-right:0.25rem}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-top:0.5rem;padding-bottom:0.5rem}.pl-5{padding-left:1.25rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-sm{font-size:0.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:0.75rem;line-height:1rem}.font-bold{font-weight:700}.font-semibold{font-weight:600}.text-amber-600{--tw-text-opacity:1;color:rgb(217 119 6 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.text-cyan-600{--tw-text-opacity:1;color:rgb(8 145 178 / var(--tw-text-opacity, 1))}.text-emerald-600{--tw-text-opacity:1;color:rgb(5 150 105 / var(--tw-text-opacity, 1))}.text-emerald-700{--tw-text-opacity:1;color:rgb(4 120 87 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.text-indigo-700{--tw-text-opacity:1;color:rgb(67 56 202 / var(--tw-text-opacity, 1))}.text-indigo-800{--tw-text-opacity:1;color:rgb(55 48 163 / var(--tw-text-opacity, 1))}.text-purple-600{--tw-text-opacity:1;color:rgb(147 51 234 / var(--tw-text-opacity, 1))}.text-purple-700{--tw-text-opacity:1;color:rgb(126 34 206 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-rose-600{--tw-text-opacity:1;color:rgb(225 29 72 / var(--tw-text-opacity, 1))}.text-rose-700{--tw-text-opacity:1;color:rgb(190 18 60 / var(--tw-text-opacity, 1))}.text-sky-700{--tw-text-opacity:1;color:rgb(3 105 161 / var(--tw-text-opacity, 1))}.text-sky-800{--tw-text-opacity:1;color:rgb(7 89 133 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.shadow-lg{--tw-shadow:0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.transition{transition-property:color, background-color, border-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-text-decoration-color, -webkit-backdrop-filter;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-text-decoration-color, -webkit-backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.hover\:bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216 / var(--tw-bg-opacity, 1))}.hover\:bg-emerald-600:hover{--tw-bg-opacity:1;background-color:rgb(5 150 105 / var(--tw-bg-opacity, 1))}.hover\:bg-green-700:hover{--tw-bg-opacity:1;background-color:rgb(21 128 61 / var(--tw-bg-opacity, 1))}.hover\:bg-indigo-700:hover{--tw-bg-opacity:1;background-color:rgb(67 56 202 / var(--tw-bg-opacity, 1))}.hover\:bg-red-50:hover{--tw-bg-opacity:1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}@media (min-width: 768px){.md\:w-1\/2{width:50%}.md\:grid-cols-3{grid-template-columns:repeat(3, minmax(0, 1fr))}}@media (min-width: 1024px){.lg\:w-1\/3{width:33.333333%}}</style></head>
<body>
<div class="presentation" id="presentation">
<!-- Slide 1: Title and Introduction -->
<div class="slide active" id="slide1">
<div class="slide-header">
<h1 class="text-4xl font-bold text-sky-700">Tailwind CSS</h1>
<p class="text-xl text-gray-600 mt-2">Lesson 3: Utility-First CSS Framework</p>
<p class="mt-3 font-semibold text-indigo-700">Grade 11 Web Development</p>
</div>
<div class="pedagogical-section">
<h3>Classroom Guidelines</h3>
<ul class="space-y-2">
<li class="flex items-start">
<span class="inline-block w-6 h-6 bg-blue-100 text-blue-800 rounded-full flex items-center justify-center mr-2 flex-shrink-0">1</span>
<span>Experiment with utility class combinations</span>
</li>
<li class="flex items-start">
<span class="inline-block w-6 h-6 bg-blue-100 text-blue-800 rounded-full flex items-center justify-center mr-2 flex-shrink-0">2</span>
<span>Help classmates understand Tailwind concepts</span>
</li>
<li class="flex items-start">
<span class="inline-block w-6 h-6 bg-blue-100 text-blue-800 rounded-full flex items-center justify-center mr-2 flex-shrink-0">3</span>
<span>Complete all hands-on activities</span>
</li>
<li class="flex items-start">
<span class="inline-block w-6 h-6 bg-blue-100 text-blue-800 rounded-full flex items-center justify-center mr-2 flex-shrink-0">4</span>
<span>Ask questions about anything unclear</span>
</li>
</ul>
</div>
<div class="pedagogical-section" style="border-left-color: #10b981;">
<h3>Learning Outcomes</h3>
<ul class="space-y-2">
<li>Understand the utility-first CSS philosophy</li>
<li>Use Tailwind's spacing and color system effectively</li>
<li>Build responsive layouts with Tailwind's breakpoints</li>
<li>Create custom components using utility classes</li>
<li>Compare Tailwind CSS with Bulma CSS</li>
</ul>
</div>
<div class="pedagogical-section" style="border-left-color: #f59e0b;">
<h3>Why Tailwind CSS Matters</h3>
<p>Tailwind CSS is the industry standard in modern web development. It provides complete design control while maintaining consistency and performance.</p>
<p class="mt-2">Unlike traditional frameworks, Tailwind doesn't impose design decisions - it gives you the tools to build exactly what you envision.</p>
</div>
<div class="mt-6 p-6 border border-sky-200 rounded-lg bg-sky-50">
<h3 class="text-xl font-bold text-gray-800 mb-4">Quick Tailwind Demonstration</h3>
<div class="space-x-4 mb-4">
<button class="px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 transition">
Primary Button
</button>
<button class="px-4 py-2 bg-emerald-500 text-white rounded-full hover:bg-emerald-600 transition">
Rounded Button
</button>
<button class="px-4 py-2 border-2 border-red-500 text-red-600 rounded hover:bg-red-50 transition">
Outline Button
</button>
</div>
<div class="grid grid-cols-1 md:grid-cols-3 gap-4 mt-4">
<div class="p-4 bg-blue-50 text-blue-800 rounded border border-blue-200">
<p class="font-semibold">Responsive Column 1</p>
<p class="text-sm mt-1">This adjusts based on screen size</p>
</div>
<div class="p-4 bg-indigo-50 text-indigo-800 rounded border border-indigo-200">
<p class="font-semibold">Responsive Column 2</p>
<p class="text-sm mt-1">Mobile: 1 column, Desktop: 3 columns</p>
</div>
<div class="p-4 bg-sky-50 text-sky-800 rounded border border-sky-200">
<p class="font-semibold">Responsive Column 3</p>
<p class="text-sm mt-1">Built with Tailwind's grid system</p>
</div>
</div>
</div>
</div>
<!-- Slide 2: Utility-First Philosophy -->
<div class="slide" id="slide2">
<div class="slide-header">
<h2 class="text-3xl font-bold text-indigo-700">Utility-First Philosophy</h2>
</div>
<div class="code-comparison">
<div>
<h3 class="text-xl font-bold text-gray-800 mb-3">Traditional CSS Approach</h3>
<div class="code-block">
/* CSS File - styles.css */
.btn-primary {
padding: 12px 24px;
background-color: #3b82f6;
color: white;
border-radius: 6px;
font-weight: 600;
border: none;
cursor: pointer;
}
.btn-primary:hover {
background-color: #2563eb;
}
.btn-danger {
background-color: #ef4444;
}
.btn-danger:hover {
background-color: #dc2626;
}
/* HTML File */
&lt;button class="btn-primary"&gt;Save&lt;/button&gt;
&lt;button class="btn-primary btn-danger"&gt;Delete&lt;/button&gt;</div>
</div>
<div>
<h3 class="text-xl font-bold text-gray-800 mb-3">Tailwind CSS Approach</h3>
<div class="code-block">
&lt;!-- No separate CSS file needed --&gt;
&lt;button class="px-6 py-3 bg-blue-500 text-white
rounded-lg font-semibold hover:bg-blue-600
transition-colors"&gt;
Save
&lt;/button&gt;
&lt;button class="px-6 py-3 bg-red-500 text-white
rounded-lg font-semibold hover:bg-red-600
transition-colors"&gt;
Delete
&lt;/button&gt;</div>
</div>
</div>
<div class="pedagogical-section">
<h3>Tailwind's Building Blocks</h3>
<div class="utility-grid">
<div class="utility-card">
<div class="font-semibold text-blue-600 mb-1">Spacing</div>
<code class="text-xs text-gray-600">p-4, m-2, mt-8</code>
<p class="text-xs mt-1">Padding, margin, and gap utilities</p>
</div>
<div class="utility-card">
<div class="font-semibold text-emerald-600 mb-1">Colors</div>
<code class="text-xs text-gray-600">bg-blue-500, text-red-600</code>
<p class="text-xs mt-1">Background, text, and border colors</p>
</div>
<div class="utility-card">
<div class="font-semibold text-purple-600 mb-1">Typography</div>
<code class="text-xs text-gray-600">text-lg, font-bold</code>
<p class="text-xs mt-1">Font size, weight, and alignment</p>
</div>
<div class="utility-card">
<div class="font-semibold text-amber-600 mb-1">Layout</div>
<code class="text-xs text-gray-600">flex, grid-cols-3</code>
<p class="text-xs mt-1">Flexbox and Grid utilities</p>
</div>
<div class="utility-card">
<div class="font-semibold text-rose-600 mb-1">Borders</div>
<code class="text-xs text-gray-600">border, rounded-lg</code>
<p class="text-xs mt-1">Border styles and radius</p>
</div>
<div class="utility-card">
<div class="font-semibold text-cyan-600 mb-1">Effects</div>
<code class="text-xs text-gray-600">shadow-lg, hover:scale-105</code>
<p class="text-xs mt-1">Shadows, transitions, transforms</p>
</div>
</div>
</div>
<div class="student-activity">
<h3 class="text-xl font-bold text-gray-800 mb-3">Practice: Convert CSS to Tailwind</h3>
<p>Convert this traditional CSS to Tailwind utility classes:</p>
<div class="code-block mt-3">
/* Traditional CSS */
.card {
padding: 20px;
margin-top: 16px;
background-color: #10b981;
color: white;
border-radius: 12px;
font-weight: bold;
text-align: center;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
border: 1px solid #059669;
}</div>
<div class="mt-4">
<label class="block font-semibold mb-2 text-gray-700">Tailwind Classes Solution:</label>
<div class="p-3 bg-gray-50 rounded border">
<code class="text-sm">p-5 mt-4 bg-emerald-500 text-white rounded-xl font-bold text-center shadow-md border border-emerald-600</code>
</div>
<p class="text-sm text-gray-600 mt-2">Try applying these classes to a div element and see the result.</p>
</div>
</div>
</div>
<!-- Slide 3: Responsive Design -->
<div class="slide" id="slide3">
<div class="slide-header">
<h2 class="text-3xl font-bold text-emerald-700">Responsive Design with Tailwind</h2>
</div>
<div class="pedagogical-section">
<h3>Mobile-First Breakpoint System</h3>
<p>Tailwind uses a mobile-first approach where styles apply to all screen sizes, then you can override them for larger screens.</p>
<div class="code-block mt-4">
&lt;!-- Mobile: 1 column, Tablet: 2 columns, Desktop: 4 columns --&gt;
&lt;div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4"&gt;
&lt;div class="p-4 bg-blue-50 border rounded"&gt;Item 1&lt;/div&gt;
&lt;div class="p-4 bg-blue-50 border rounded"&gt;Item 2&lt;/div&gt;
&lt;div class="p-4 bg-blue-50 border rounded"&gt;Item 3&lt;/div&gt;
&lt;div class="p-4 bg-blue-50 border rounded"&gt;Item 4&lt;/div&gt;
&lt;/div&gt;</div>
<div class="utility-grid mt-6">
<div class="utility-card">
<div class="font-semibold">sm: (Small)</div>
<div class="text-sm text-gray-600">≥640px</div>
<code class="text-xs mt-1 block">sm:text-lg</code>
</div>
<div class="utility-card">
<div class="font-semibold">md: (Medium)</div>
<div class="text-sm text-gray-600">≥768px</div>
<code class="text-xs mt-1 block">md:flex</code>
</div>
<div class="utility-card">
<div class="font-semibold">lg: (Large)</div>
<div class="text-sm text-gray-600">≥1024px</div>
<code class="text-xs mt-1 block">lg:w-1/2</code>
</div>
<div class="utility-card">
<div class="font-semibold">xl: (Extra Large)</div>
<div class="text-sm text-gray-600">≥1280px</div>
<code class="text-xs mt-1 block">xl:grid-cols-4</code>
</div>
<div class="utility-card">
<div class="font-semibold">2xl: (2X Large)</div>
<div class="text-sm text-gray-600">≥1536px</div>
<code class="text-xs mt-1 block">2xl:container</code>
</div>
</div>
</div>
<div class="live-editor">
<h3 class="text-xl font-bold text-gray-800 mb-3">Hands-On: Build a Responsive Card</h3>
<p>Create a card component that responds differently on various screen sizes:</p>
<ul class="list-disc pl-5 mt-2 space-y-1">
<li>Full width on mobile devices</li>
<li>Half width on tablets (≥768px)</li>
<li>One-third width on desktops (≥1024px)</li>
<li>Include padding, shadow, and rounded corners</li>
</ul>
<div class="editor-container">
<div>
<h4 class="font-semibold mb-2 text-gray-700">Your Tailwind Code:</h4>
<textarea id="responsiveCode">&lt;div class=""&gt;
&lt;h3 class=""&gt;Card Title&lt;/h3&gt;
&lt;p class=""&gt;This card should be responsive. On mobile it takes full width, on tablet half width, and on desktop one-third width.&lt;/p&gt;
&lt;/div&gt;</textarea>
<button class="mt-3 px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 transition" onclick="updateResponsivePreview()">
Update Preview
</button>
</div>
<div>
<h4 class="font-semibold mb-2 text-gray-700">Live Preview:</h4>
<div class="preview" id="responsivePreview">
<div class="w-full md:w-1/2 lg:w-1/3 p-6 shadow-lg rounded-xl border border-gray-200">
<h3 class="text-xl font-bold mb-2 text-gray-800">Card Title</h3>
<p class="text-gray-600">This card should be responsive. On mobile it takes full width, on tablet half width, and on desktop one-third width.</p>
</div>
</div>
<p class="text-sm text-gray-600 mt-2">Resize your browser window to see the responsiveness.</p>
</div>
</div>
</div>
</div>
<!-- Slide 4: Framework Comparison -->
<div class="slide" id="slide4">
<div class="slide-header">
<h2 class="text-3xl font-bold text-rose-700">Comparing Tailwind and Bulma</h2>
</div>
<div class="code-comparison">
<div>
<h3 class="text-xl font-bold text-gray-800 mb-3">Bulma CSS (Component-Based)</h3>
<div class="code-block">
&lt;!-- Bulma Button --&gt;
&lt;button class="button is-primary is-large is-rounded"&gt;
Click me
&lt;/button&gt;
&lt;!-- Bulma Card --&gt;
&lt;div class="card"&gt;
&lt;div class="card-content"&gt;
&lt;p class="title"&gt;Card Title&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;!-- Bulma Grid --&gt;
&lt;div class="columns"&gt;
&lt;div class="column"&gt;Column 1&lt;/div&gt;
&lt;div class="column"&gt;Column 2&lt;/div&gt;
&lt;/div&gt;</div>
<div class="comparison-pros bg-blue-50">
<h4 class="font-bold mb-2">Strengths:</h4>
<ul class="text-sm space-y-1">
<li>Excellent for beginners and rapid prototyping</li>
<li>Human-readable, semantic class names</li>
<li>Consistent design out of the box</li>
<li>No JavaScript required</li>
<li>Great for projects where design consistency is priority</li>
</ul>
</div>
</div>
<div>
<h3 class="text-xl font-bold text-gray-800 mb-3">Tailwind CSS (Utility-First)</h3>
<div class="code-block">
&lt;!-- Tailwind Button --&gt;
&lt;button class="px-6 py-3 bg-blue-500 text-white
rounded-full text-lg font-semibold
hover:bg-blue-600 transition-colors"&gt;
Click me
&lt;/button&gt;
&lt;!-- Tailwind Card --&gt;
&lt;div class="p-6 shadow-lg rounded-lg border"&gt;
&lt;p class="text-2xl font-bold"&gt;Card Title&lt;/p&gt;
&lt;/div&gt;
&lt;!-- Tailwind Grid --&gt;
&lt;div class="grid grid-cols-1 md:grid-cols-2 gap-4"&gt;
&lt;div class="p-4"&gt;Column 1&lt;/div&gt;
&lt;div class="p-4"&gt;Column 2&lt;/div&gt;
&lt;/div&gt;</div>
<div class="comparison-pros bg-emerald-50">
<h4 class="font-bold mb-2">Strengths:</h4>
<ul class="text-sm space-y-1">
<li>Complete design control and customization</li>
<li>Smaller CSS file sizes in production</li>
<li>Current industry standard (2026)</li>
<li>Excellent for unique, custom designs</li>
<li>Better for team collaboration on large projects</li>
</ul>
</div>
</div>
</div>
<div class="student-activity">
<h3 class="text-xl font-bold text-gray-800 mb-4">Framework Selection Exercise</h3>
<p>Based on what you've learned about both frameworks, which would you choose for these projects and why?</p>
<div class="space-y-4 mt-4">
<div class="p-4 border border-gray-300 rounded-lg">
<h4 class="font-bold mb-2">Project A: University Department Website</h4>
<p class="text-sm text-gray-600 mb-3">Needs to match existing university branding, multiple content editors will maintain it, must be accessible and consistent across all pages.</p>
<div class="flex items-center space-x-6">
<label class="flex items-center">
<input type="radio" name="projectA" value="bulma" class="mr-2">
<span>Bulma CSS</span>
</label>
<label class="flex items-center">
<input type="radio" name="projectA" value="tailwind" class="mr-2">
<span>Tailwind CSS</span>
</label>
</div>
</div>
<div class="p-4 border border-gray-300 rounded-lg">
<h4 class="font-bold mb-2">Project B: Startup Analytics Dashboard</h4>
<p class="text-sm text-gray-600 mb-3">Unique data visualization needs, complex interactive components, design system needs to be created from scratch, team of 5 developers.</p>
<div class="flex items-center space-x-6">
<label class="flex items-center">
<input type="radio" name="projectB" value="bulma" class="mr-2">
<span>Bulma CSS</span>
</label>
<label class="flex items-center">
<input type="radio" name="projectB" value="tailwind" class="mr-2">
<span>Tailwind CSS</span>
</label>
</div>
</div>
</div>
<button class="mt-4 px-4 py-2 bg-indigo-600 text-white rounded hover:bg-indigo-700 transition" onclick="showComparisonAnswers()">
View Suggested Answers
</button>
<div id="answers" class="hidden mt-3 p-3 bg-gray-50 rounded border">
<p><strong>Project A:</strong> Bulma - Better for maintaining consistent branding across multiple editors</p>
<p><strong>Project B:</strong> Tailwind - Better for custom designs and team collaboration on complex interfaces</p>
</div>
</div>
</div>
<!-- Slide 5: Final Project -->
<div class="slide" id="slide5">
<div class="slide-header">
<h2 class="text-3xl font-bold text-purple-700">Final Project: Blog Enhancement</h2>
</div>
<div class="pedagogical-section">
<h3>Project Brief</h3>
<p>You will enhance a basic blog layout using Tailwind CSS. Start with the provided HTML structure and apply Tailwind utility classes to create a modern, responsive blog.</p>
<div class="code-block mt-3">
&lt;!-- Starting HTML Structure --&gt;
&lt;!DOCTYPE html&gt;
&lt;html lang="en"&gt;
&lt;head&gt;
&lt;meta charset="UTF-8"&gt;
&lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
&lt;title&gt;My Tailwind Blog&lt;/title&gt;
&lt;script src="https://cdn.tailwindcss.com"&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;header&gt;
&lt;h1&gt;My Blog&lt;/h1&gt;
&lt;nav&gt;
&lt;a href="#"&gt;Home&lt;/a&gt;
&lt;a href="#"&gt;Articles&lt;/a&gt;
&lt;a href="#"&gt;About&lt;/a&gt;
&lt;/nav&gt;
&lt;/header&gt;
&lt;main&gt;
&lt;article&gt;
&lt;h2&gt;Blog Post Title&lt;/h2&gt;
&lt;p&gt;Blog post content goes here...&lt;/p&gt;
&lt;/article&gt;
&lt;/main&gt;
&lt;footer&gt;
&lt;p&gt;© 2026 My Blog&lt;/p&gt;
&lt;/footer&gt;
&lt;/body&gt;
&lt;/html&gt;</div>
</div>
<div class="student-activity">
<h3 class="text-xl font-bold text-gray-800 mb-3">Enhancement Requirements</h3>
<p>Apply Tailwind CSS to achieve the following:</p>
<div class="space-y-3 mt-3">
<div class="p-3 bg-gray-50 rounded border">
<h4 class="font-semibold">1. Navigation Bar</h4>
<p class="text-sm text-gray-600">Create a responsive navigation bar with logo, links, and mobile hamburger menu.</p>
</div>
<div class="p-3 bg-gray-50 rounded border">
<h4 class="font-semibold">2. Hero Section</h4>
<p class="text-sm text-gray-600">Add a hero section with gradient background, centered title, and call-to-action button.</p>
</div>
<div class="p-3 bg-gray-50 rounded border">
<h4 class="font-semibold">3. Blog Posts Grid</h4>
<p class="text-sm text-gray-600">Create a responsive grid of blog posts (1 column mobile, 2 tablet, 3 desktop).</p>
</div>
<div class="p-3 bg-gray-50 rounded border">
<h4 class="font-semibold">4. Footer</h4>
<p class="text-sm text-gray-600">Design a footer with social links, copyright, and newsletter signup.</p>
</div>
</div>
<div class="mt-6 p-4 bg-blue-50 rounded-lg border border-blue-200">
<h4 class="font-bold mb-2">Implementation Tips</h4>
<ul class="text-sm space-y-1">
<li>Use <code class="bg-blue-100 px-1 rounded">container mx-auto</code> for centering content</li>
<li>Apply <code class="bg-blue-100 px-1 rounded">md:</code> and <code class="bg-blue-100 px-1 rounded">lg:</code> prefixes for responsive behavior</li>
<li>Utilize Tailwind's spacing scale (p-4, m-2, gap-4, etc.)</li>
<li>Add hover states with <code class="bg-blue-100 px-1 rounded">hover:</code> prefix</li>
<li>Use <code class="bg-blue-100 px-1 rounded">flex</code> and <code class="bg-blue-100 px-1 rounded">grid</code> for layouts</li>
</ul>
</div>
<div class="mt-6">
<h4 class="font-bold mb-2">Submit Your Project</h4>
<textarea placeholder="Paste your enhanced blog HTML code here..." class="w-full p-3 border rounded min-h-40"></textarea>
<button class="mt-3 px-4 py-2 bg-green-600 text-white rounded hover:bg-green-700 transition">
Submit Final Project
</button>
</div>
</div>
<div class="mt-6 p-6 bg-gray-50 rounded-lg border">
<h3 class="text-xl font-bold text-gray-800 mb-2">Lesson 3 Completion Checklist</h3>
<ul class="space-y-2">
<li class="flex items-center">
<input type="checkbox" class="mr-2">
<span>Understand utility-first CSS philosophy</span>
</li>
<li class="flex items-center">
<input type="checkbox" class="mr-2">
<span>Can use Tailwind's spacing and color system</span>
</li>
<li class="flex items-center">
<input type="checkbox" class="mr-2">
<span>Can create responsive layouts with breakpoints</span>
</li>
<li class="flex items-center">
<input type="checkbox" class="mr-2">
<span>Can compare Tailwind and Bulma effectively</span>
</li>
<li class="flex items-center">
<input type="checkbox" class="mr-2">
<span>Have enhanced a blog layout with Tailwind</span>
</li>
</ul>
</div>
</div>
</div>
<div class="nav-controls">
<button id="prevBtn" onclick="prevSlide()" disabled="">
Previous
</button>
<div class="slide-counter">
Slide <span id="currentSlide">1</span> of <span id="totalSlides">5</span>
</div>
<button id="nextBtn" onclick="nextSlide()">
Next
</button>
</div>
<script>
let currentSlide = 1;
const totalSlides = 5;
function updateSlide() {
// Hide all slides
document.querySelectorAll('.slide').forEach(slide => {
slide.classList.remove('active');
});
// Show current slide
document.getElementById(`slide${currentSlide}`).classList.add('active');
// Update counter
document.getElementById('currentSlide').textContent = currentSlide;
document.getElementById('totalSlides').textContent = totalSlides;
// Update buttons
document.getElementById('prevBtn').disabled = currentSlide === 1;
document.getElementById('nextBtn').disabled = currentSlide === totalSlides;
}
function nextSlide() {
if (currentSlide < totalSlides) {
currentSlide++;
updateSlide();
}
}
function prevSlide() {
if (currentSlide > 1) {
currentSlide--;
updateSlide();
}
}
function updateResponsivePreview() {
const code = document.getElementById('responsiveCode').value;
document.getElementById('responsivePreview').innerHTML = code;
}
function showComparisonAnswers() {
document.getElementById('answers').classList.remove('hidden');
}
// Initialize
updateSlide();
// Keyboard navigation
document.addEventListener('keydown', (e) => {
if (e.key === 'ArrowRight' || e.key === ' ') {
nextSlide();
} else if (e.key === 'ArrowLeft') {
prevSlide();
}
});
</script>
</body></html>