mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-12-02 05:15:21 +09:00
The Builder was stalling when selecting instances because Tag selector resolution repeatedly scanned and parsed project styles for every displayed property. This PR indexes that data when styles change, reuses style source suggestions, and avoids an unnecessary stylesheet rebuild on multi-selection. It also restores the documented `:hover .button` and `:hover > .icon` selectors, fixes their editing preview, and adds sharp light and dark Tag styles screenshots. Ref #5657 Closes #6678 ### Plan and tools - [x] Reproduce the selector rejection in shared validator and runtime tests. - [x] Restore one shared validation path for new and saved selectors. Keep CSS parsing through css-tree. - [x] Update Tag styles and States and selectors docs, navigation emoji, and paired Storybook screenshots. - [x] Measure the instance selection slowdown and remove repeated full scans while preserving source order. - [x] Audit the full selection path and reuse existing style indexes in state matching and style controls. - [x] Avoid redundant Tag CSS rebuild on multi-selection and test that real preview styles still clear. - [x] Fix descendant state previews for Token, Local, and Tag styles; verify live Tag editing. - [x] Run targeted tests, typechecks, lint, formatting, and inspect both screenshot themes. - [ ] Monitor PR checks and address failures. - [ ] Approve the new Storybook baseline after user review. Verification: CSS data 62 tests; project build styles 167 tests; Builder style panel/model 113 targeted tests; canvas selection and styles 89 targeted tests; CSS data/project build/Builder typechecks; lint; formatting. A local benchmark with 5,100 styles, 5,001 instance selections, and 100 property reads fell from 99 ms to 6 ms for reads after the second fix, plus 6 ms to build indexes when data changed. The original repeated style scan measured 716 ms for 100 reads with no instance selection map. These measure the affected calculation, not total Builder selection time. Two older selection-time style scans remain and cost about 0.1 ms each per 5,100 declarations in a synthetic Node scan; their output ordering needs a separate check before changing them. Previewing an unrelated Token or Local edit still rebuilds the Tag stylesheet, an editing-time cost outside the reported selection path. No fixture inputs or generated fixture bundles changed. Agent evaluations were not run because they require separate approval.
10 KiB
10 KiB
Table of contents
Basics
university
- ⚛️ Foundations
- 🏠 Dashboard
- 🛠️ Anatomy of the Webstudio builder
- 🗺️ Navigator
- 📐 Layout & Flexbox
- 📐 Layout & Grid
- 📱 Responsive design
- 📱 Breakpoints
- 🧱 CSS variables
- 🖌️ Design tokens
- 🎨 Style panel
- 🏷️ Tag styles
- 🎯 States and selectors
- 🔡 Variables
- ➕ Expression editor
- 🎨 Custom classes & attributes
- 🔄 Transforms
- 🎬 Animations
- 💾 CMS
- ♻️ Reusability & maintainability
- ↔️ Copy-Paste
- 🔍 Commands & search
- 🗂️ Assets
- 📚 Content Engine
- 🎯 SEO settings
- ⚡ Performance
- ⌨️ Shortcuts
- 📄 Page settings
- 📄 Page templates
- ⚙️ Project settings
- 🌐 HTTP response headers
- 🔀 Path patterns
- 🎭 Modes
- 🔗 Share links
- 🌐 Publishing & custom domains
- 🧩 Core Components
- 📦 Element
- 🔗 Link
- 🔲 Slot
- ➖ Separator
- 📝 Text
- 🔤 Heading
- 📄 Paragraph
- ✏️ Inline Text
- 💬 Blockquote
- ⚠️ Alert
- 📄 Code Text
- ✍️ Form
- ✍️ Webhook Form (deprecated)
- 🔘 Button
- 🏷️ Label
- 📝 Input
- 📝 Text Area
- 📋 Select
- ☑️ Checkbox
- 🔘 Radio Button
- 🖼️ Image
- 🎬 Video
- ⏯️ Vimeo
- ▶️ Vimeo Background Video
- ▶️ YouTube
- 💾 Collection
- 🪜 Content Embed
- 🪜 Markdown Embed
- 📝 Content Block
- 📃 List
- ⌨️ HTML Embed
- 🎬 Animation Group
- Text Animation
- 🎥 Video Animation
- 👨👨👦👦 Stagger Animation
- 🗂️ Head Slot
- 🏷️ JSON-LD
- 📘 XML Node
- 🕐 XML Time
- 🕐 Time
- 📛 Built with Webstudio
- ⬛ CLI
- 🤖 MCP
- ✨ Inception
- ▫️ Radix UI Components
- Marketplace
- 🤖 Webstudio AI
- 📤 Self-Hosting
- 🧑🏫 How-Tos
- ▶️ How to add icons
- ▶️ How to use custom fonts
- ▶️ How to create fluid video backgrounds with Vimeo
- ▶️ How to crop an image without cropping the original
- ▶️ How to create responsive navigation
- 🍀 How to add a GSAP animation
- ▶️ How to make a custom 404 page
- ▶️ Build Your Own Directory Website with Airtable
- ▶️ Using filters to dynamically display content
- 🔗 Integrations
- How to build a frontend for Supabase using Webstudio
- How to build a frontend for Airtable using Webstudio
- How to integrate a Webhook Form with Airtable (deprecated)
- How to build a frontend for Baserow using Webstudio
- How to build a frontend for Hygraph using Webstudio
- How to build a WordPress frontend using Webstudio (no-code builder)
- How to integrate a Notion database with Webstudio
- How to integrate Webhook Form with Pabbly (deprecated)
- How to integrate Webhook Form with Zapier (deprecated)
- How to integrate Webhook Form with N8N (deprecated)
- How to integrate Flotiq with Webstudio
- Craft