Day 6 of CSS Tricks π¨
CSS scroll-behavior β smooth scrolling in 1 line.
html {
scroll-behavior: smooth;
}
No JavaScript. No libraries. No Stack Overflow rabbit hole.
Just pure CSS magic. β¨
#CSS#WebDev#Frontend#CSStricks
Day 5 of CSS Tricks π¨
CSS clamp() β fluid typography without media queries.
h1 {
font-size: clamp(1.5rem, 5vw, 3rem);
}
Min size β fluid scaling β max size.
One line replaces 10 breakpoints. Your CSS file just lost weight. π
#CSS#WebDev#Frontend#CSStricks
Day 4 of CSS Tricks π¨
CSS :is() selector β write less, target more.
Instead of this:
h1 a, h2 a, h3 a, h4 a { color: red; }
Do this:
:is(h1, h2, h3, h4) a { color: red; }
Cleaner code. Same result. Less crying. π
#CSS#WebDev#Frontend#CSStricks
Day 3 of CSS Tricks π¨
CSS Grid β build complex layouts with 2 lines.
auto-fit minmax = a fully responsive grid with ZERO media queries.
Your designer will think you're a wizard. π§ββοΈ
#CSS#WebDev#Frontend#CSStricks
Day 2 of CSS Tricks π¨
CSS Flexbox in 30 seconds β center ANYTHING perfectly.
That's it. No more margin hacks. No more position tricks.
Flex is your best friend. π€
#CSS#WebDev#Frontend#CSStricks
Day 1 of CSS Tricks π¨
CSS Custom Properties (Variables) β the most underused power move in CSS.
Instead of hardcoding colors everywhere:
Change one value β update your entire UI instantly. π₯
#CSS#WebDev#Frontend#CSStricks
Alright, I'll list them here:
@traversymedia - literally everything you can imagine about web dev
@KevinJPowell - top CSS guy (csstricks is also awesome)
@DevSimplified - just watch a single video of his
@thenetninjauk - very high quality content
@designcoursecom - he's just awesome in UI and UX design, and he's a dev too.
and any of the freeCodeCamp videos
GM π
CSS tip:
Use `text-wrap: pretty;` to make text line breaks look cool and reduce that ugly line breaks on the last line.
#csstrick#csstricks#css#html
Still my favorite CSS trick today π‘
Use clamp() for responsive font sizes that adjust perfectly on any screen.
No more tiny mobile text or huge desktop titles π
#webdev#frontend#csstips
ALT Use clamp() for responsive font sizes that adjust perfectly on any screen.
No more tiny mobile text or huge desktop titles π
#webdev #frontend #csstips