Core Concepts
- Specificity, cascade, and inheritance
- Box model:
content + padding + border + margin
- Responsive units:
rem, vw, %, clamp()
.card {
padding: 1.25rem;
border: 1px solid rgba(255,255,255,0.1);
border-radius: 12px;
}
Flexbox
.row {
display: flex;
gap: 1rem;
justify-content: space-between;
align-items: center;
}
CSS Grid
.grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
gap: 1rem;
}
Transitions & Animations
.btn {
transition: transform .2s ease, box-shadow .2s ease;
}
.btn:hover {
transform: translateY(-2px);
box-shadow: 0 10px 30px rgba(59,130,246,.4);
}