mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-10-27 15:16:53 +09:00
This PR replaces the limited "States" dropdown in the Style Panel with a flexible input field that supports any CSS selector, pseudo-class, or pseudo-element. This allows for advanced styling capabilities such as `:has()`, `:focus-visible`, and complex combinators. ## Key Changes ### Flexible Selector Input - Replaced the fixed "States" category list with a free-form input field. - Supports **any** valid CSS selector (e.g., `:hover`, `::before`, `:has(:checked)`). - Validation logic ensures only valid selectors are accepted (triggered on `Enter` key). ## How to Test 1. Select an element and open the Style Panel. 2. Click on the Local style source or a Token. 3. In the input field (bottom of menu), type a selector like `:hover` or `:first-child` and press Enter. 4. Verify the selector is added and selected. --------- Co-authored-by: zehjotkah <111518041+zehjotkah@users.noreply.github.com>