Video tutorialTrack course · freeCodeCamp
Speed
Transcript & captions
3/3
csscss
/* mobile first: write the small screen styles, then enhance */
.card { padding: 16px }
@media (min-width: 768px) {
.card { padding: 32px }
}
/* fluid typography with no breakpoints */
h1 { font-size: clamp(1.75rem, 5vw, 4rem) }Try it yourself
Knowledge check
0/1 answeredWhat does mobile-first mean?