Show HN: A DevTools-Level JavaScript API for DOM and CSS Style Rules https://ift.tt/o1wCqX8

Show HN: A DevTools-Level JavaScript API for DOM and CSS Style Rules It is a wrapper around the Chrome DevTools Protocol (CDP), the same API that DevTools uses, to inspect elements programmatically and intuitively, like accessing DOM. Why this? I have seen too many tools pretending they can get matched CSS style rules but actually only computed styles. The real DevTools data—CSS rules, selectors, and cascading order—is what we want to retrieve programmatically, yet CDP is hard to use, full of undocumented quirks. One has to observe Devtools' behavior and check the huge DevTools frontend codebase to know how to use it. Having worked on a Chromium fork before, I feel it is time to solve this once and for all. What can we build around this? That's what I'd love to ask you all. Probably like many, MCP was what came to my mind first, but then I wondered that given this simple API, maybe agents could just write scripts directly? Need opinions. My own use case was CSS inlining. This library was actually split from my UI cloner project: https://ift.tt/cmlgPwZ I was porting a WordPress + Elementor site and wanted to automate the CSS translation from unreadable stylesheets. So, what do you think? Any ideas, suggestions, or projects to build upon? Would love to hear your thoughts—and feel free to share your own projects in the comments! https://ift.tt/BCZuplz November 8, 2025, at 05:13AM

LinkHarvestDigest Commentary
  • Signal: Most tools only expose computed styles, not the actual matched CSS rules developers need.

  • Take: Wrapping CDP into a clean API lowers the barrier for programmatic DOM/CSS inspection.

  • Actionable: Try applying this API to automate CSS inlining or stylesheet translation in migration projects.

  • Watchlist: Monitor adoption among frontend tooling ecosystems — could become a foundation for agent-driven UI automation.


 Curated Items

  • Item 1: DevTools Protocol (CDP)—The underlying API powering Chrome DevTools.

    • Why it matters: Provides unmatched access to DOM and CSS internals.

    • Use this if you need precise style rule inspection.

    • Link: Chrome DevTools Protocol

  • Item 2: UI Cloner Project—The origin of this library.

    • Why it matters: Demonstrates real-world CSS inlining and translation.

    • Use this if you’re migrating sites from WordPress/Elementor.

    • Link: Project Source

  • Item 3: Matched CSS vs Computed Styles—The key distinction.

    • Why it matters: Matched rules reveal selectors and cascade order, computed styles don’t.

    • Use this if you’re debugging complex CSS overrides.

    • Link: MDN CSS Cascade Guide


 Key Insights

  • Trend: Developers want deeper programmatic access to browser internals for automation.

  • Risk: CDP quirks and undocumented behavior can slow adoption.

  • Opportunity: A simplified wrapper could become the backbone for agent-driven UI manipulation.


Comments

Popular posts from this blog

Complete Guide to E-Commerce Business: Meaning, Models, and How to Start

Micro Niches: The Secret Weapon for SaaS Startups Struggling to Gain Traction

"From Micro Niche to Money Maker: How I Validated My E-Commerce Idea with AI (No Budget Needed)" Published: September 23, 2025 Keywords: Micro niche, AI validation, e-commerce, free tools, startup strategy Introduction Ever wondered if your e-commerce idea is worth pursuing? In this post, I’ll walk you through how I used free AI tools to validate a micro niche, build a lean store, and test demand—without spending a dime. If you’re stuck between ideas or afraid of wasting time and money, this guide is your shortcut to clarity. Step-by-Step Breakdown 1. Finding the Micro Niche Used ChatGPT to brainstorm underserved product categories. Cross-referenced with Google Trends and AnswerThePublic to check search interest. 2. Validating Demand Leveraged Perplexity AI to analyze competitors and market gaps. Ran polls using Typeform and Twitter/X to gauge interest. 3. Building the Store Created a free storefront using Shopify Starter and Canva for branding. Used Durable.co to generate landing page copy in minutes. 4. Driving Traffic Scheduled posts with Buffer across Instagram, Threads, and LinkedIn. Used Notion AI to draft blog content and email sequences. 5. Tracking Results Monitored engagement with Google Analytics and Hotjar. Adjusted product positioning based on feedback from Tally Forms. Key Takeaways Micro niches are goldmines when paired with smart AI validation. You don’t need a budget—just the right tools and strategy. Testing before investing saves time, money, and frustration. Thinking of launching your own store? Drop your niche idea in the comments and I’ll help you validate it with AI—free of charge!