css-handbook.pdf
2 MB
📝 CSS HANDBOOK
CSS, a shorthand for Cascading Style Sheets, is one of the main building blocks of the Web. Its history goes back to the 90's and along with HTML it has changed a lot since its humble beginnings.
Having created websites since before CSS existed, I have seen its evolution. 10 CSS is an amazing tool, and in the last few years it has grown a lot, introducing many fantastic features like CSS Grid, Flexbox and CSS Custom Properties.
CSS, a shorthand for Cascading Style Sheets, is one of the main building blocks of the Web. Its history goes back to the 90's and along with HTML it has changed a lot since its humble beginnings.
Having created websites since before CSS existed, I have seen its evolution. 10 CSS is an amazing tool, and in the last few years it has grown a lot, introducing many fantastic features like CSS Grid, Flexbox and CSS Custom Properties.
🔥12👍2
js-handbook.pdf
577.9 KB
📝 JS HANDBOOK
The JavaScript Handbook follows the 80/20 rule: learn in 20% of the time the 80% of a topic.
In particular, the goal is to get you up to speed quickly with JavaScript.
The JavaScript Handbook follows the 80/20 rule: learn in 20% of the time the 80% of a topic.
In particular, the goal is to get you up to speed quickly with JavaScript.
❤14👍1
💥 Tailwind CSS is ruining web development.
I said it.
You build faster, but you stop thinking in CSS.
Agree or disagree?
👉 Drop your opinion below.
I said it.
You build faster, but you stop thinking in CSS.
Agree or disagree?
👉 Drop your opinion below.
❤8👍4
🎯 Here’s how to center anything in CSS — even your soul:
🔥 Bookmark this. Or tattoo it on your arm.
🔁 Share it with a junior dev.
.parent {
display: flex;
justify-content: center;
align-items: center;
}🔥 Bookmark this. Or tattoo it on your arm.
🔁 Share it with a junior dev.
👍7❤5🤩5
😱 WTF
Ever seen this JS behavior?
WTF is going on here?
Can you explain the 3rd one?
Ever seen this JS behavior?
console.log([] + []); // ''
console.log([] + {}); // '[object Object]'
console.log({} + []); // 0
WTF is going on here?
Can you explain the 3rd one?
👍9
⚡️ React trick: use useEffect in React like a pro
✅ Clean up side effects.
💬 Have you ever forgotten the return part?
useEffect(() => {
const handler = () => console.log('resize');
window.addEventListener('resize', handler);
return () => window.removeEventListener('resize', handler);
}, []);✅ Clean up side effects.
💬 Have you ever forgotten the return part?
❤11👍3
🤖 Will AI take your frontend dev job in 5 years?
Be honest.
Be honest.
Anonymous Poll
34%
😨 Yes, 100%
28%
🤷♂️ Maybe, but not all jobs
19%
😎 No, creative devs will thrive
19%
🧠 I’m already using AI to code faster
❤1
🤖 Which AI tools are part of your dev workflow?
💬 What’s your killer combo? Personally, I use ChatGPT for planning + Cursor for coding. 📤 Share with your team to compare stacks.
💬 What’s your killer combo? Personally, I use ChatGPT for planning + Cursor for coding. 📤 Share with your team to compare stacks.
Anonymous Poll
58%
🧠 ChatGPT / GPT-4
27%
🧑💻 Cursor (AI coding IDE)
16%
✍️ Claude (for docs & code reviews)
20%
📷 GitHub Copilot
13%
🛑 I don’t trust AI yet
👍7👌2
🪝 Smooth Anchor Scroll in React
Aloha, frontend comrades! 🌴
Recently I had to solve a classic UX problem: when a user closes one tab or section, they should be automatically scrolled to another part of the page.
Sounds simple enough, right? Here’s how you can implement anchor-like behavior in React using ref and scrollIntoView().
⸻
🔧 The gist:
1. Create a ref for the target element
2. Trigger ref.current.scrollIntoView() when needed
⸻
🧪 Example Code:
✨ Bonus tip: You can add behavior: "smooth" for smooth scrolling like this:
Happy experimenting!
💬 Have you ever needed anchors in a React app?
📤 Share this post with a dev who loves clean UX.
Aloha, frontend comrades! 🌴
Recently I had to solve a classic UX problem: when a user closes one tab or section, they should be automatically scrolled to another part of the page.
Sounds simple enough, right? Here’s how you can implement anchor-like behavior in React using ref and scrollIntoView().
⸻
🔧 The gist:
1. Create a ref for the target element
2. Trigger ref.current.scrollIntoView() when needed
⸻
🧪 Example Code:
import React, { useRef } from 'react';
const ScrollDemo = () => {
const myRef = useRef(null);
const executeScroll = () => myRef.current.scrollIntoView();
return (
<>
<div style={{ height: 600 }} />
<div ref={myRef}>This is the element we’ll scroll to</div>
<div style={{ height: 1500 }} />
<button onClick={executeScroll}>Scroll to element</button>
</>
);
};
✨ Bonus tip: You can add behavior: "smooth" for smooth scrolling like this:
myRef.current.scrollIntoView({ behavior: "smooth" });
Happy experimenting!
💬 Have you ever needed anchors in a React app?
📤 Share this post with a dev who loves clean UX.
👍13🔥1
👨🍼 Junior Tip
🧠 If you’re a junior dev, here’s ONE mindset shift to level up:
💬 Stop writing code to “make it work.”
Start writing code you can defend in a code review.
📤 Forward to a dev starting their first job.
🧠 If you’re a junior dev, here’s ONE mindset shift to level up:
💬 Stop writing code to “make it work.”
Start writing code you can defend in a code review.
📤 Forward to a dev starting their first job.
❤10👍10
🥋 IYKYK
🧪 Only real devs know what this means:
😵💫 Drop the one that haunted you most.
👀 Forward to a dev friend to test their sanity.
🧪 Only real devs know what this means:
== vs ===
null vs undefined
0.1 + 0.2 !== 0.3
NaN !== NaN
😵💫 Drop the one that haunted you most.
👀 Forward to a dev friend to test their sanity.
👍7🔥1
UX Red Flag Sunday ✅
🚩 UX red flags that scream “junior coded this”:
• <div>s with onClick instead of <button>
• Scroll jank
• Input with no label
• Spinner. Forever. No feedback.
❗ Seen worse? Drop it below.
🧠 Save this for your code review checklist.
🚩 UX red flags that scream “junior coded this”:
• <div>s with onClick instead of <button>
• Scroll jank
• Input with no label
• Spinner. Forever. No feedback.
❗ Seen worse? Drop it below.
🧠 Save this for your code review checklist.
❤6👍1
🙏 Dev Confession Monday
Forgive me, dev Gods, for I have sinned:
• Wrote CSS in JS… and enjoyed it
• Pushed to main on Friday
• Used !important 12 times
• Ignored eslint warnings
🧼 Cleanse yourself in the comments.
📨 Confess anonymously: tag a fellow sinner.
Forgive me, dev Gods, for I have sinned:
• Wrote CSS in JS… and enjoyed it
• Pushed to main on Friday
• Used !important 12 times
• Ignored eslint warnings
🧼 Cleanse yourself in the comments.
📨 Confess anonymously: tag a fellow sinner.
👍9👏3❤1