A new JS library just dropped yesterday that might change how we think about text layout on the web. 🔤 pretext : pure TypeScript, measures text with zero DOM reflow, zero getBoundingClientRect : zero layout thrashing. Just the browser's own font engine, exposed properly at last. To see what it unlocks, I built a playable DOOM-style ASCII dungeon in the browser on day one. 🎮 Every character placed with exact proportional width. Every frame. No CSS. No DOM reads. 🕹️ Play it: doom-pretext.netlify.app 📦 Try it: https://lnkd.in/g7qXYSAg Sometimes the most important foundational tools ship quietly. This one deserves more noise. #Frontend #WebDev #CreativeCoding #CSS #TextLayout #OpenSource #UIEngineering #Canvas #WebAnimation #Innovation
More Relevant Posts
-
👉 Day 79 – Frontend Foundations Revisited ✨ Today was all about revision and reinforcement. I revisited the core building blocks of frontend development — HTML, CSS, Bootstrap, and JavaScript (up to DOM) — to strengthen my fundamentals and ensure clarity before moving deeper. 🔸 Revised semantic HTML and how structure impacts accessibility. 🔸 Practiced CSS styling, layouts, and responsive design principles. 🔸 Revisited Bootstrap utilities for faster UI building. 🔸 Reinforced JavaScript basics and DOM manipulation concepts. 🌱 Reflection – Revision is not repetition; it’s refinement. Each revisit uncovers new insights and strengthens confidence. Just like debugging code, revisiting fundamentals helps debug our understanding. ⚡ Day 79 reminded me that mastery comes not from rushing ahead, but from revisiting and reinforcing the basics that power everything we build. #Day79 #FrontendDevelopment #HTML #CSS #Bootstrap #JavaScript #DOM #CodingJourney #10000Coders #LearnInPublic #100DaysOfCode
To view or add a comment, sign in
-
𝟵𝟵% 𝗼𝗳 𝗙𝗿𝗼𝗻𝘁𝗲𝗻𝗱 𝗗𝗲𝘃𝗲𝗹𝗼𝗽𝗲𝗿𝘀 𝘀𝘁𝗿𝘂𝗴𝗴𝗹𝗲 𝘄𝗶𝘁𝗵 𝘁𝗵𝗲𝘀𝗲 𝗳𝘂𝗻𝗱𝗮𝗺𝗲𝗻𝘁𝗮𝗹𝘀 👇 Not because they’re hard… But because we rarely revisit the “why” behind the tools we use daily. 1️⃣ Before Flexbox & Grid — how were responsive layouts actually built in CSS? 2️⃣ 𝗦𝗖𝗦𝗦 vs 𝗣𝗼𝘀𝘁𝗖𝗦𝗦 — what’s the real difference? And is SCSS still relevant in 𝟮𝟬𝟮𝟲? 3️⃣ Can you explain the 𝟳-𝗶𝗻-𝟭 SCSS architecture? What exactly are partials? 4️⃣ What does an async function return in JavaScript? Write the exact syntax. 5️⃣ Which asset formats are most optimal for modern HTML rendering (especially with srcset)? 6️⃣ What is a 𝗖𝗗𝗡 — and why are 𝗖𝗗𝗡 links usually placed inside <𝗵𝗲𝗮𝗱>. What breaks if you move them to <𝗯𝗼𝗱𝘆>? 7️⃣ Which CSS unit scales most effectively across different viewport sizes—and why? If you can confidently answer all of these, you’re already ahead of most developers in real-world frontend engineering. Curious — how many can you answer without Internet? 👀 ~ Aslam Mohammed #frontend #javascript #webdevelopment #css #reactjs #frontenddeveloper #webperf #programming #softwareengineering #devcommunity #100DaysOfCode #techcareers
To view or add a comment, sign in
-
2025 was the year CSS started replacing your JavaScript. Customizable <select> -- no more Radix or Headless UI dropdowns. Invoker commands -- open a dialog with zero JS. CSS carousels -- native dots and arrows with ::scroll-marker. Scroll-state queries -- detect if a sticky header is stuck, in CSS. Each of these features eliminates a JS library you're probably still importing. Here are the 6 CSS features from 2025 that change how you build UIs. Which one are you most excited to use in production? Prepare for front end interviews with questions and solutions written by ex-FAANG engineers: https://lnkd.in/gqcS3Fbv #CSS #FrontEnd #WebDevelopment #Chrome #JavaScript #GreatFrontEnd
To view or add a comment, sign in
-
🌙 Your users' eyes will thank you. Here's how to build a dark mode toggle with pure CSS — no JavaScript needed. Dark mode isn't just a trend. It reduces eye strain, saves battery on OLED screens, and makes your UI feel polished and modern. And the best part? You don't need a single line of JavaScript to pull it off. Here's everything you need to know 👇 ✅ CSS Custom Properties are the foundation Define all your colors as --variables under :root, then override them inside [data-theme="dark"]. One attribute flip changes your entire UI instantly. ✅ The Checkbox Hack — pure CSS toggle A hidden input type="checkbox" combined with the :checked pseudo-class lets you switch themes with zero JavaScript. Clean, lightweight, effective. ✅ Respect the OS preference automatically Use @media (prefers-color-scheme: dark) to detect the user's system setting and apply dark styles before they even touch your toggle. ✅ Smooth transitions = professional feel Add transition: background 0.3s, color 0.3s on the body element. No jarring flashes — just butter-smooth theme switching. ✅ Persist the user's choice Save their preference to localStorage and restore it on page load. Nobody wants to re-toggle every single visit. ✅ Never skip accessibility Add aria-label="Toggle dark mode" and update aria-checked dynamically. Build for everyone, not just mouse users. The tech stack? Just HTML + CSS. That's it. Save this post for your next project 🔖 Drop a 🌙 in the comments if you've already shipped dark mode — or tag a developer who needs to see this! #CSS #WebDevelopment #FrontendDevelopment #DarkMode #HTMLandCSS #WebDesign #CSSVariables #UIDesign #100DaysOfCode #CodeNewbie #Programming #JavaScript #Frontend #DevTips #TechCommunity
To view or add a comment, sign in
-
-
CSS Masonry is finally becoming simple !! Here’s the story in short: 🟡Earlier, creating Pinterest-style layouts was not easy 🟡We had to depend on hacks, columns, or JavaScript libraries 🟡It never felt clean or truly “CSS-like” Now things are improving: 🟡CSS is introducing a native solution using Grid → grid-lanes 🟡You just use `display: grid-lanes` 🟡Continue using normal Grid properties like `grid-template-columns` and `gap` 🟡The browser automatically handles uneven item heights Why this is a big deal: * No hacks * No extra JavaScript * Cleaner and more maintainable code * Feels natural and built into CSS I tried it recently, and it works smoothly. Feels like after years, CSS finally got this right. For more insightful content checkout below: 🟦 𝑳𝒊𝒏𝒌𝒆𝒅𝑰𝒏 - https://lnkd.in/dwi3tV83 ⬛ 𝑮𝒊𝒕𝑯𝒖𝒃 - https://lnkd.in/dkW958Tj 🟥 𝒀𝒐𝒖𝑻𝒖𝒃𝒆 - https://lnkd.in/dDig2j75 or Priya Frontend Vlogz 🔷 𝐓𝐰𝐢𝐭𝐭𝐞𝐫 - https://lnkd.in/dyfEuJNt #frontend #javascript #react #reactjs #html #css #typescript #es6 #interviewquestions #interview #interviewpreparation #CSS #Frontend #WebDev
To view or add a comment, sign in
-
-
Small but powerful knowledge A few days ago, I learned the `getBoundingClientRect()` method in JavaScript, which really intrigued me. At the time, I didn’t fully comprehend what this function does; however, after some testing, I understood its importance when developing web applications that require UI positioning. Here is an example I have tested: ```js const tab = document.querySelector('.tab'); const rect = tab.getBoundingClientRect(); console.log(rect); ``` It will return: * `width` * `height` * `top` * `left` It is basically giving the information about **the position on the screen and dimensions of the HTML element**. Position and layout manipulation are equally important as styling. Have you used this function yourself? tell me ! #JavaScript #FrontendDevelopment #WebDevelopment
To view or add a comment, sign in
-
https://pretextjs.dev A new frontend library called Pretext (March 2026) is trying to change how we handle text layout. Current approach: Render → Measure → Re-render Pretext approach: Calculate → Render once Instead of using DOM measurements like getBoundingClientRect(), it lets you: • Predict text size before rendering • Avoid layout shifts • Reduce re-renders Useful for: • Chat/message UIs • Infinite scroll lists • Dynamic cards • Multilingual layouts It works without the DOM and can run on the server as well. Still new, but interesting direction for performance-focused UIs. #frontend #javascript #reactjs #webperformance
To view or add a comment, sign in
-
This JavaScript library completely changed how I think about text. I’ve been working on my portfolio recently using the Pretext library by Cheng Lou and it’s absurd. Pretext is a JavaScript library that lets you break out of traditional CSS and DOM constraints and build truly dynamic UI. Instead of rendering everything and asking the DOM what happened, with Pretext you compute and measure everything first, then render once. This shift feels small, but it opens the door to more innovative, dynamic interfaces that aren't limited by typical layout rules. Check it out👇 : https://lnkd.in/ghedSc_K Pretext by Cheng Lou: https://lnkd.in/dy2n-utx #pretext #webdev #javascript #react #userinterface
To view or add a comment, sign in
-
Over the weekend, I tried a small experiment and built an npm package called SetCSS. I’ve been curious for a while how tools like Tailwind actually work under the hood, so I decided to try building a runtime version of it myself. Instead of generating CSS at build time, it parses class names from the DOM and injects styles dynamically using JavaScript. Under the hood, it’s basically: DOM traversal → class-to-style mapping → style injection via <style> tags. It’s still a POC, but building this gave me a much clearer understanding of the trade-offs between build-time vs runtime styling, and how closely DOM, rendering, and styling are connected. npm package: https://lnkd.in/d8MWYNEm #javascript #nodejs #webdevelopment #frontend #npm
To view or add a comment, sign in
-
𝐖𝐡𝐞𝐧 𝐲𝐨𝐮𝐫 𝐜𝐨𝐝𝐞 𝐥𝐢𝐭𝐞𝐫𝐚𝐥𝐥𝐲 𝐬𝐢𝐠𝐡𝐬 𝐚𝐭 𝐲𝐨𝐮𝐫 𝐦𝐢𝐬𝐭𝐚𝐤𝐞𝐬... 🤦♂️🔊 I just finished a project where I built a 𝐒𝐢𝐦𝐨𝐧 𝐒𝐚𝐲𝐬 𝐁𝐫𝐚𝐢𝐧 𝐠𝐚𝐦𝐞, and I wanted it to feel a bit more "alive." So, instead of the usual boring buzzer, I added a custom “𝗳𝗮𝗮𝗮𝗵” sound that plays every time you lose. 😂 😂 It’s surprisingly motivating (or frustrating, depending on your high score)! This was a great chance to get hands-on with Vanilla JavaScript and manage complex game states. Here’s a breakdown of what I implemented: 🚀 𝐊𝐞𝐲 𝐅𝐞𝐚𝐭𝐮𝐫𝐞𝐬: • 𝐃𝐲𝐧𝐚𝐦𝐢𝐜 𝐋𝐨𝐠𝐢𝐜: Classic “repeat the sequence” setup where the pace picks up as you progress. • 𝐏𝐞𝐫𝐬𝐢𝐬𝐭𝐞𝐧𝐭 𝐒𝐜𝐨𝐫𝐢𝐧𝐠: Integrated localStorage so your Best Score sticks around between sessions. • 𝐌𝐨𝐝𝐞𝐫𝐧 𝐓𝐨𝐨𝐥𝐢𝐧𝐠: Built with Vite for a smooth dev experience and used ES modules to keep the codebase clean. • 𝐀𝐮𝐝𝐢𝐨 𝐀𝐫𝐜𝐡𝐢𝐭𝐞𝐜𝐭𝐮𝐫𝐞: Leaned on the Web Audio API and HTML audio to provide instant feedback, including that "iconic" game-over roast. • 𝐍𝐞𝐨𝐧 𝐔𝐈: A fully responsive design with a sleek neon aesthetic using custom CSS. 🛠️ 𝐓𝐞𝐜𝐡 𝐒𝐭𝐚𝐜𝐤: JavaScript (ES6+) | Vite | HTML5/CSS3 | Web Audio API Check out the link 👇 🔗Live: https://lnkd.in/gigMMGGt try to beat your high score, and try not to get roasted by the sound effect!😀 #WebDevelopment #JavaScript #ViteJS #FrontEnd #CodingProject #SoftwareEngineering #SimonSays #ProgrammingHumor #OpenSource
To view or add a comment, sign in
More from this author
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development