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
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
-
Built a small frontend project — a Gradient Generator 🎨 Focused on improving my understanding of DOM manipulation, event handling, and dynamic UI updates using JavaScript. ⚙️ Features: • Random gradient generation • Direction control • Live preview • One-click copy 🌐 Live Demo: https://lnkd.in/gcQSkiWS 📂 GitHub: https://lnkd.in/g8H34Ped A simple build, but a good step forward in strengthening fundamentals. #webdevelopment #frontend #javascript
To view or add a comment, sign in
-
Watch My Calculator Project in Action! I recently built this calculator using HTML, CSS, and JavaScript, and here’s a quick demo of how it works What I worked on: • Implementing JavaScript logic for calculations • Handling user input and button events • DOM manipulation for dynamic updates • Creating a clean and responsive UI 💡 This project helped me strengthen my understanding of how frontend logic works behind the scenes. Every small project is a step forward, and I’m excited to keep building and improving my skills. 💬 I’d love to hear your feedback! #WebDevelopment #JavaScript #Frontend #Projects #LearningJourney #BSCS
To view or add a comment, sign in
-
We often hear that JavaScript is single threaded. But at the same time, it handles API calls, timers, and UI updates smoothly. The reason is the Event Loop. Here is a simple way to understand it. Think in terms of 5 parts: 1. Call Stack This is where code runs right now. If something blocks here (like an infinite loop), everything else stops. 2. Web APIs The browser handles things like fetch, setTimeout, and events outside the main thread. When they are done, they send callbacks to queues. 3. Microtask Queue (high priority) This includes Promise callbacks and async/await. All microtasks run completely before anything else happens. -> If you keep adding microtasks (like recursive Promise.then), you can actually block rendering completely. 4. Macrotask Queue (low priority) This includes setTimeout, setInterval, and other tasks. Only one macrotask runs at a time. 5. Render After microtasks are done, the browser updates the UI (layout and paint). -> The browser decides when to paint — not strictly after every loop. Simple cycle: Run one macrotask → run all microtasks → update UI → repeat JavaScript isn’t non-blocking — the event loop just makes it feel that way. #javascript #frontend #reactjs #webdevelopment #softwareengineering #webperformance #systemdesign #Coding
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
-
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
To view or add a comment, sign in
-
Built a to-do app with a glassmorphic UI as a mini project. Kept it simple — vanilla HTML, CSS, and JS. No frameworks. A few things I learned along the way: — Local Storage API to persist tasks on refresh — DOM manipulation with vanilla JS — How CSS backdrop-filter actually works for the glass effect — JSON.stringify and JSON.parse for saving arrays Small project but learned a lot from it. More coming. repo link: https://lnkd.in/dEtj35Us #WebDev #JavaScript #Frontend #BuildInPublic
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
-
Server-Side Rendering or Client-Side Rendering One of the most impactful decisions in a React project isn't which library to use — it's when to render. After working with Next.js on several production systems, here's a practical breakdown: ✅ Use Server-Side Rendering (SSR) when: • SEO matters (landing pages, public content) • The page depends on frequently updated data • You need faster Time to First Byte (TTFB) ✅ Use (CSR) when: • The page is behind authentication • Interactivity is the core experience • Data doesn't need to be indexed 💡 Use React Server Components when: • You want zero JS sent to the client for static parts • You're fetching data at the component level without prop drilling 📈 The real skill isn't mastering one approach — it's knowing which one fits the problem. What rendering strategy do you default to and why? Drop it in the comments. 👇 #React #NextJS #WebDevelopment #Frontend #JavaScript
To view or add a comment, sign in
-
-
🎨 Fresh Project: Building a Color Scheme Generator with Vanilla JS! I’m excited to share my latest frontend project: a Color Scheme Generator! 🚀 As I continue to sharpen my responsive design and JavaScript skills, I wanted to build something that solves a common problem for creators—finding the perfect palette. Whether you need a complementary contrast or a subtle monochrome vibe, this tool fetches it all in real-time using Vanilla JS and TheColorAPI. demo : https://lnkd.in/dk74nWT5 Git repo: https://lnkd.in/d9rhtt47 #WebDevelopment #Frontend #JavaScript #CodingJourney #CSS #ResponsiveDesign #LearnToCode
To view or add a comment, sign in
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
So good to see this Sharvi Belsare Always keep exploring! Never settle.