FE Bits Vol.3|CSS attr() Typed Evolution, PostCSS Retrospective After 12 Years

发表于 2025-08-17 12:00 2020 字 11 min read

cos avatar

cos

FE / ACG / 手工 / 深色模式强迫症 / INFP / 兴趣广泛养两只猫的老宅女 / remote

FE Bits Vol.26 | Gatsby Supports React 19, Rspress 2.0 ReleasedFE Bits Vol.25 | Yarn 6 to Be Rewritten in Rust, CSS Grid Lanes ProgressFE Bits Vol.24 | Rolldown 1.0 RC, Anime.js v4.3 Auto Layout, and Chrome 145 100vw Scrollbar AwarenessFE Bits Vol.23 | jQuery 4 Released, Chrome Adds Vertical Tabs, Astro Acquired by CloudflareFE Bits Vol.22 | CSS @scope Now Widely Available, ViteLand December RecapFE Bits Vol.21 | Blog Christmas Effects and Moe Copy Update, AntV Launches InfographicFE Bits Vol.20 | Blog Updates and FEDAY Highlights, Shadcn Create ReleasedFE Bits Vol.19|New Site Features and React Discloses Two New RSC VulnerabilitiesFE Bits Vol.17|WebGPU Now Supported by All Major Browsers, Ant Design 6 Officially ReleasedFE Bits Vol.16|Cloudflare Incident Report Released, CSSWG Confirms Masonry Layout Syntax grid-lanesFE Bits Vol.15|Chrome Width/Height Animation Reflow Optimization, Node Type Stripping Goes StableFE Bits Vol.14|Chrome Supports Split Views, npm Enforces 2FA, Rspack 1.6FE Bits Vol.13|TypeScript Becomes GitHub's Most-Used Language for the First Time, VoidZero Raises $12.5M Series AFE Bits Vol.12|Next.js 16 Released, Docusaurus 3.9 AI Search, ChatGPT Atlas LaunchedFE Bits Vol.11|React Native 0.82 New Architecture Lands, Bun 1.3 Full-Stack RuntimeFE Bits Vol.10|React Compiler v1.0 Released, React Foundation Established, Vite Documentary and Vite+ LaunchFE Bits Vol.9|Chrome DevTools Launches MCP, Nuxt UI Pro Goes Open Source and FreeFE Bits Vol.8|PyCon Trip, Cloudflare's Big Bug, and NPM Sandworm AlertFE Bits Vol.7|Security Alerts for chalk, debug and Other npm Packages; Remotion Sponsors MediabunnyFE Bits Vol.6|What Changes and What Stays, Chrome's 17th Anniversary and CSS Mixins DraftFE Bits Vol.5|Nx Package Compromised, ESLint Multi-threaded Linting, and Firefox Experimental PWAFE Bits Vol.4|Next 15.5, RN 0.81, and Some Handy ToolsFE Bits Vol.3|CSS attr() Typed Evolution, PostCSS Retrospective After 12 YearsFE Bits Vol.2|V8 Speeds Up JSON.stringify 2x, Vite Weekly Downloads Surpass Webpack for the First TimeFE Bits Vol.1|Hello World, TanStack DB First Beta Release
This week's frontend weekly covers updates including GitHub CEO resignation, Microsoft shutting down Lens, RSLint release, and more. Focus areas include CSS attr(), anchor positioning, PostCSS experience retrospective, AI tool practices, open-source project evolution, and community reflections. Tool recommendations include CSS-Questions, self.so, Online CSS Analyzer, Omnara AI supervisor, and more, plus practical CSS new features and development resources.

This article has been machine-translated from Chinese. The translation may contain inaccuracies or awkward phrasing. If in doubt, please refer to the original Chinese version.

This weekly aims to update every Sunday. The website is under construction… Currently recommend subscribing via Folo to this weekly’s Quaily RSS. WeChat Official Account: FE Bits. Click the original article link to view the full post. I created a small QQ discussion group 598022684 — feel free to join for casual discussions about frontend tech & life. You can also submit your own articles. It’s more of a fan group~ This weekly is also open-sourced at fe-bits-weekly, feel free to follow along.

Today is August 17, 2025, Sunday.

This Tuesday I celebrated my 24th birthday. Looking back, it’s quite emotional — I can’t believe I’m already 24. In the blink of an eye, my younger sister has finished her college entrance exam and is starting university. Time really does fly.

This week’s content is lighter, but still enough, so I didn’t merge it into a biweekly issue.

Ecosystem & Community Updates

No major moves this week, so here are some interesting articles and events I care about~

Articles & Videos

In this episode, we invited Hawstein, the author of “Five Years as an Independent Creator.” Starting from indie development, we talked about a lot of reflections on ourselves and the times. After six years of making PythonHunter, this is personally (laike9m) my favorite episode, and I hope everyone enjoys it too. Keywords for this episode: Indie Development / Life Planning / Modernity & Division of Labor / Side Projects / Open Source / The Cost of Freedom / Existential Crisis / Tech Optimism / Reflections on Death

I really liked this podcast episode — very thought-provoking.

CSS New Features

Several excellent articles about CSS attr():

This issue’s CodePen Spark#464 is themed around CSS attr().

Tools & Library Updates

  • CSS-Questions | CSS-Tricks: Sunkanmi Fafowora launched the CSS-Questions website, offering 100+ questions and a comprehensive 20-question speed test to check your CSS knowledge.

  • self.so: Turn your resume into a publishable personal website with one click. Upload a resume PDF, get it reviewed by Llama Guard and parsed by Qwen 2.5 to generate a site. Built on Next.js, Clerk, S3, Upstash. Open source, deployable on Vercel.

  • RSS Anything: Convert website link lists into RSS feeds using Diffbot’s Extract API.

  • Tiny Helpers: A collection of online tools for developers and designers. Covers hundreds of tools for colors, CSS, images, icons, performance, accessibility, APIs, and more, browseable by name or date.

    Tiny Helpers ScreenShot

  • Online CSS Analyzer - Project Wallace: Project Wallace maintains a set of CSS tools — enter a URL to analyze the current CSS codebase. Highly recommended!

    CSS Analyzer ScreenShot

  • Liquid Glass | Cubiq: Another interactive “liquid glass” filter and drag effect demo. Experience fluid-textured UI interactions through background filters and drag handles.

  • Repetition Image Animation: In this GSAP-driven demo, a hallway photo stretches into a series of psychedelic hall-of-mirrors effects. Toggle different variants and see what happens on click and drag.

  • Omnara AI Supervisor: An open-source AI agent “task control panel” for real-time monitoring and interaction on mobile/web (notifications, Q&A, remote launch), supporting Claude/Cursor/Copilot and more, with SDK, MCP/REST interfaces, and iOS/Web clients.

  • Defuddle: A tool for extracting and cleaning main content from web pages, designed to provide readable and structured content for further processing or Markdown conversion.

  • KittenTTS: KittenTTS is an ultra-lightweight (25MB, no GPU required) English text-to-speech model that runs on any device with impressive results. English only.

Deep Dives

What We Learned from Creating PostCSS

What we learned from creating PostCSS

This article felt really interesting, so I’m noting it down briefly.

AI Summary: This is a 12-year retrospective of PostCSS’s evolution: from Autoprefixer’s birth to PostCSS becoming open-source infrastructure adopted by Google, Wikipedia, Tailwind, and others, with 400 million monthly downloads. The author covers product positioning, plugin strategy, performance architecture, version evolution, community and ecosystem, coexisting with competitors, and preventing maintainer burnout, offering a reusable methodology spanning frontend toolchain development and open-source operations: prioritize user usability, win performance through architecture, reduce configuration through defaults, foster collaboration through personal touch, and stabilize ecosystems through incremental changes.

Lessons the author learned:

Lesson -1: Be more collaborative with your big customers. At minimum, give them the opportunity to send you pull requests with prototypes. Lesson 0: Don’t forget to allocate plenty of time for writing documentation and promoting your open-source project. Also, don’t hesitate to directly contact potential customers to suggest they use your library.

Invest as much time in README and outreach as in writing code. Proactively recommending Webpack use PostCSS as its parser drove critical growth.

Lesson 1: Balance between plugins and built-in features. If you have plugins, provide a complete out-of-the-box solution for most users. Only those with unique needs should need to disable/enable plugins.

By default, PostCSS doesn’t do anything. To make it do any work, you need to add a specific plugin. This approach has two problems: people don’t like making choices, and most projects need the same functionality anyway. So PostCSS users always complained about struggling with this huge plugin list without knowing what they needed. Compare this with the amazing Lightning CSS, which already has essential features built in (like polyfills, bundling, and minification), and only needs plugins for specific use cases. This reminds me of a good practice in Ruby on Rails: convention over configuration. Suggest some defaults for users; don’t ask them to define everything.

Lesson 2: Don’t be afraid it’s too late. Chrome stopping prefix additions and the announcement of CSS Houdini never made Autoprefixer and PostCSS lose their value; actual landing speed and effectiveness are what the market tests. Build prototypes quickly, look at real results, and don’t get swayed by “new tech will replace everything” narratives.

Lesson 3: For performance, architecture matters more than programming language.

PostCSS written in JS was 4x faster than Sass written in C. Not because JS is a better programming language, but because of better architecture and memory management. The JS community is poisoned by hype, and big companies frequently use it. So we all think in simplistic black-and-white concepts like “C is faster than JS” or “everything in Rust is faster.” Lightning CSS written in Rust is faster than PostCSS (and overall, it’s an excellent tool). That said, I believe this is because Devon Govett was able to further improve the architecture and memory control, not just by rewriting the same algorithms from JS to Rust. I particularly want to emphasize the importance of memory management in performance. For example, CSSTree, also written in JS, was about 1.5x faster than PostCSS at the time, mainly through cleverly reusing objects to minimize garbage collector calls.

Lesson 4: Avoid burnout by ensuring problems don’t recur The best ways to prevent problems:

  • Add types to prevent incorrect API usage.
  • Add additional JS code to check API usage.
  • Adding documentation should always be the last step, since many users don’t read documentation. But often it’s the only option.

Lesson 5: Deprecate in the first major version, remove in the next major version

The best approach for major API changes is the tick-tack method:

  • In the first major version, mark the API as deprecated.
  • Then only remove this API in the next major version.

Lesson 6: Provide best practices that shape the ecosystem

Use guides, examples, and templates to promote good practices and discourage bad ones. Don’t assume people will discover all best practices on their own!

Don’t forget, examples in documentation aren’t just illustrations — they shape habits in the community. Use them wisely!

Lesson 7: Become friends with your competitors

In open source, we all work for free, and any new “competitor” can save you from spending your own time supporting people for free.

Lesson 8: The human touch matters for community

  • Human bonds: Sending postcards/stickers to plugin authors, visiting active contributors during travel, building real connections.
  • Brand style: Autoprefixer’s “knight” and PostCSS’s “alchemy” themes make projects more fun and easier to build cultural identity around.

Finally, some “controversial” tips for open-source maintainers.

  • Go build-free when possible: Libraries should use native JS source code with handwritten .d.ts or TypeDoc, making it easy to install branches for testing and instant debugging by copying from node_modules.
  • Don’t use React for static sites: Project documentation and websites should use Astro or plain static HTML — lower maintenance cost and more stable.

Done ovo

喜欢的话,留下你的评论吧~

© 2020 - 2026 cos @cosine
Powered by theme astro-koharu · Inspired by Shoka