21,333 views
✏️ Let's discuss the pixel problem and its solution — the Rem unit of measurement, which can and should be used for literally all properties and even for defining media query ranges. We'll figure out how to implement adaptive font size using the clamp CSS function and the rem + vw units of measurement, and wrap everything in a convenient fluid-text Sass mixin. We'll create a function for converting a value from pixels to Rem using a Sass function. 🔴 Timeline: ▶ 00:00 Introduction ▶ 00:30 The Pixel Problem ▶ 03:26 The Rem Unit of Measurement ▶ 05:36 Rem for font-size and other CSS properties ▶ 08:17 The Em Unit of Measurement ▶ 09:19 Rem for element sizes ▶ 11:15 Rem for media queries ▶ 14:55 Incorrect use of Rem units - decreasing font-size for html during adaptation ▶ 17:30 Responsive font size via clamp, rem and vw ▶ 22:20 Converting value from pixels to Rem via Sass function ▶ 24:45 Conclusion 📚 Links: ➖ Code from the lesson: https://github.com/aleksanderlamkov/p... ➖ PostCSS plugin pxtorem: https://www.npmjs.com/package/postcss... 💬 Telegram chat (help for beginners): https://t.me/friendlyFrontendChat 🔸 Boosty (support the channel): https://boosty.to/friendly-frontend 🗂️ Free courses on the channel: 🟠 HTML: • HTML course 2024 🔵 CSS: • CSS course 2024 🟡 JS: • JavaScript course 2024 🟢 A11y: • Accessibility course 2024 ⚪️ Master class on layout for beginners: • Adaptive website layout from scratch for n... 🔘 Master class on markup for advanced (BEM, SCSS): • Website markup from 0 to result HTM... 🗺 Frontend Roadmap 2024 • Frontend Roadmap 2024 What should be taken into account... 📌 Author: ➖ Personal website: https://aleksanderlamkov.ru/ ➖ Telegram: https://t.me/friendlyFrontend ➖ Boosty: https://boosty.to/friendly-frontend ➖ GetMentor: https://getmentor.dev/mentor/aleksand... ➖ Solvery: https://solvery.io/mentor/aleksanderl... #frontend #фронтенд #css