惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

美团技术团队
IT之家
IT之家
博客园 - Franky
博客园_首页
The Cloudflare Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
量子位
阮一峰的网络日志
阮一峰的网络日志
月光博客
月光博客
V
V2EX
Hugging Face - Blog
Hugging Face - Blog
博客园 - 三生石上(FineUI控件)
M
MIT News - Artificial intelligence
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI
Stack Overflow Blog
Stack Overflow Blog
小众软件
小众软件
Jina AI
Jina AI
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 叶小钗
Apple Machine Learning Research
Apple Machine Learning Research
B
Blog RSS Feed

Hacker News: Show HN

PurrrrrFocus: Pomodoro Timer App - App Store Workflow Engine — Multi-Step Orchestration for Bun RapidPhoto: Pro Photo Editor App - App Store GitHub - DheerG/swarms: Achieve extraordinary results with claude code across a variety of tasks SPICE simulation → oscilloscope → verification with Claude Code — Lucas Gerads Show HN: VCoding – A 5 MB native Windows IDE with no dynamic dependencies Show HN: LLMs don't hallucinate because they're bad at math, it's the format GitHub - Agent-FM/agentfm-core: AgentFM is a peer-to-peer network that turns everyday computers into a decentralized AI supercomputer. AgentFM lets you run massive AI workloads directly across a global mesh of idle CPUs and GPUs. Show HN: Tracking Top US Science Olympiad Alumni over Last 25 Years GitHub - Potarix/agent-hub: One place to talk to all your agents Show HN: Runtime security for AI agents(injection,tool abuse, data exfiltration) GitHub - dubeyKartikay/lazyspotify: Terminal Spotify client for macOS and Linux GitHub - the-banana-tool/king-louie: Easy to use GUI Personal AI Assistant. Win/Linux/Mac. Show HN I made my vacation rental bookable by AI agents–no Airbnb, 0% commission GitHub - basteez/jsf-autoreload: maven plugin to enable hot reload on jsf projects uvm32/hosts/host-gdbstub at main · ringtailsoftware/uvm32 GitHub - labsai/EDDI: Config-driven engine that turns JSON into production-grade AI agents. Multi-agent orchestration, 12+ LLM providers, MCP/A2A protocols, RAG, persistent memory, and enterprise compliance (EU AI Act, GDPR, HIPAA). Built on Quarkus. GitHub - glitchnsec/fortyone-oss: AI Executive Assistant Platform Quickstart | Alien GitHub - muxshed/shed: One stream in, or many. Every destination, simultaneously. No cloud middleman, no per-channel fees, no limits. GitHub - ocrbase-hq/ocrbase: 📄 PDF/IMG ->.MD/JSON Document OCR API for PaddleOCR and GLMOCR. Self-hostable. GitHub - impactjo/home-memory: MCP server that lets your AI assistant remember everything about your home. GitHub - Sets88/dbcls: DbCls is a powerful terminal database client that supports various databases GitHub - neptun2000/heor-agent-mcp GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh RollQuation: Math Puzzles - Apps on Google Play GitHub - dropbox/witchcraft Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis GitHub - opentalon/opentalon: OpenTalon is an open-source platform built from the ground up in Go as a robust alternative to OpenClaw LinkedIn™ 职位抓取工具 - Chrome 应用商店
screen-adapt - Visual Studio Marketplace
Shawn_Someth · 2026-05-07 · via Hacker News: Show HN

Responsive scaffolding for VS Code. Write your base CSS or Tailwind classes, run the command, and Screen Adapt generates the responsive variants automatically. A PostCSS plugin compiles the custom CSS syntax to standard media queries at build time.

No changes to JSX. No new layout system. No runtime cost.


Requirements

Screen Adapt requires the PostCSS plugin to compile the custom CSS syntax at build time.

When the extension activates, it checks whether screen-adapt is installed in your project. If not, it prompts you to install it automatically. You can also install it manually:

npm install screen-adapt

Then create a PostCSS config file in your project root. If your project has "type": "module" in package.json, the file must be named postcss.config.cjs. Otherwise, postcss.config.js works.

const screenAdapt = require('screen-adapt')

module.exports = {
  plugins: [screenAdapt.default || screenAdapt]
}

The screenAdapt.default || screenAdapt handles the ES module interop. Using require('screen-adapt') directly will throw a PostCSS plugin error.

The PostCSS plugin is only required for the CSS workflow. The Tailwind workflow does not need it.


CSS workflow

Setup

Open any CSS file and press Cmd+Shift+I (Mac) or Ctrl+Shift+I (Windows), or run Screen Adapt: Initialise @screens.

This inserts a default @screens block at the top of the file:

@screens {
  mob-ver: (max-width: 30em) and (orientation: portrait);      /* ~480px */
  mob-hor: (max-width: 52.75em) and (orientation: landscape);  /* ~844px */
  tab-ver: (max-width: 64em) and (orientation: portrait);      /* ~1024px */
  tab-hor: (max-width: 64em) and (orientation: landscape);     /* ~1024px */
  desk-ver: (min-width: 65em) and (orientation: portrait);     /* ~1040px */
}

Remove or comment out any screen sizes you don't need. Whatever remains gets scaffolded.

Single selector

Place your cursor inside any CSS selector and press Cmd+Shift+S (Mac) or Ctrl+Shift+S (Windows). Screen Adapt scaffolds responsive variants for that selector only.

You can also right-click and select Screen Adapt: Add screen variants.

All selectors

Press Cmd+Shift+A (Mac) or Ctrl+Shift+A (Windows) to scan the entire file and scaffold all selectors at once. Selectors that already have variants are skipped. A comment block is added after the imports listing any skipped selectors.


Tailwind workflow

Screen Adapt reads your breakpoints from tailwind.config.ts or tailwind.config.js in the workspace root. No setup step required — just write your base Tailwind classes and run the command.

theme.screens is used if defined. Falls back to theme.extend.screens. If neither exists, or if the config uses spreads or dynamic imports that can't be resolved, the command will show an error.

Single element

Place your cursor inside a className string on any JSX/TSX element and press Cmd+Shift+T (Mac) or Ctrl+Shift+T (Windows). Screen Adapt scaffolds responsive variants for that element only.

Both static strings and expression syntax are supported:

className="w-96 p-4 text-base"
className={"w-96 p-4 text-base"}

You can also right-click and select Screen Adapt: Add Tailwind variants.

All elements

Press Cmd+Shift+E (Mac) or Ctrl+Shift+E (Windows) to scan the entire file and scaffold all elements at once. Elements that already have variants are skipped.

After the scan, two comments are added to the file:

Skipped elements — inserted after the imports, lists elements that already had variants:

/* screen-adapt: skipped elements (already have variants)
   <div className="w-96 md:w-1/2 ...">
*/

Classes to review — inserted after the closing ) of the return statement, lists generated variants that Screen Adapt couldn't reason about and need manual review:

// screen-adapt: review these classes
// sm:grid, md:grid, lg:grid

On subsequent runs, both comments are replaced with fresh ones.


How values are generated

Both workflows use the same generation logic, adapted for their respective formats. The base viewport assumed for scaling is 1440px.

Numeric properties (width, height, padding, margin, max-width, font-size) are scaled proportionally from the base viewport to the target breakpoint size.

Structural properties use predefined templates:

  • grid-cols-{n} collapses to grid-cols-1 at the smallest breakpoint, grid-cols-2 at the next, and restores the original from there up
  • flex-row switches to flex-col at the smallest breakpoint and restores from the next up

Text size steps down one size per breakpoint, from largest to smallest (e.g. text-xltext-lgtext-base).

Everything else is copied as-is and flagged for review.


Notes

  • The @screens block is per-file. Different stylesheets can target different screen sets.
  • Variants are never overwritten. Remove existing variants manually before re-scaffolding.
  • CSS breakpoints use em units so they scale with the user's font size preference.
  • The Tailwind workflow only operates on static className strings. Dynamically constructed class strings (clsx, cn, template literals) are not supported.
  • To hide an element on a specific screen size in CSS, set display: none in that variant block. The PostCSS plugin compiles it to a standard media query and the browser handles the rest.