Urgent.News

the world's headlines, one feed

Tech

EffCSS hydration: server work, client trust, zero waste

Currently the CSS-in-JS ecosystem is split into two camps: Runtime CSS-in-JS (Emotion, styled-components) keeps JS on the client for full dynamism. At hydration it reuses the SSR-injected styles, so the CSSOM isn't duplicated but JS code still runs. Zero-runtime (Linaria, Vanilla Extract, Panda CSS) removes runtime entirely: styles become static .css files at build time. The price is equally…

EffCSS introduces a novel approach to the CSS-in-JS ecosystem by separating the logical name of a style from its corresponding CSS selector. Currently, the ecosystem is divided into two main approaches: Runtime CSS-in-JS (Emotion, styled-components) and Zero-runtime CSS-in-JS (Linaria, Vanilla Extract). Both approaches tie the selector to the style in some way, forcing recomputation and limiting the options for dynamic styles.

Runtime CSS-in-JS keeps JavaScript on the client for full dynamism, but the selector is a hash of the style, limiting the ability to retrieve existing selectors without rebuilding and re-hashing. Zero-runtime CSS-in-JS compiles styles into static .css files at build time, avoiding recomputation but limiting the ability to create dynamic styles.

EffCSS takes a different approach by decoupling the selector from the CSS. It generates the selector from a namespace/ordinal rather than from the CSS string, maintaining a separate dictionary mapping logical names to selectors. This decoupling allows for independent serialization and storage of styles and metadata, enabling efficient server-side rendering and client-side hydration while maintaining the flexibility to create dynamic styles.

The clear separation of concerns between logical names and CSS selectors addresses the core issue of tying styles to their identity and offers a more flexible and efficient approach to styling in web development.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written; read the original for the full account.

Read the original at dev.to →

More in Tech

Why Vite Asked Me to Choose Between Oxlint and ESLint

While initializing a new Vite project ( npx create-vite ), I hit an interactive CLI prompt that paused my standard workflow: ◆ Which linter to use?

  • Vite prompts user to choose between Oxlint and ESLint during project creation.
  • Oxlint, a Rust-based linter, offers faster execution and reduced startup overhead.
  • ESLint has a mature plugin ecosystem but runs on Node.js/JavaScript.

How We Solved 360 Video Streaming & Real-Time Uploading for iOS Devices

When building real-time media applications—especially in high-stakes environments like remote exam proctoring—supporting mobile devices comes with a unique set of technical hurdles.

  • Dynamic wildcard subdomains mapped to production PFX certificate in memory for iOS TLS compatibility
  • Sequence-aware buffering maintained video stream order during network fluctuations
  • In-memory buffer decoding piped video chunks directly to cloud storage, eliminating disk writes

The beginning of my journey

I was interested in cybersecurity (mainly offensive) for a long time but I had no idea where to start. I remember finding a few apps on my phone and them being so superficial that I temporarily…

  • Journey into cybersecurity began with curiosity about offensive side
  • Ethical hacking concept sparked interest after discovering TryHackMe
  • Continued learning through HackTheBox while exploring game development and bioinformatics