Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.
TypeScript accessibilityalternativecloudflarecloudflare-workersdesignfreefrontendopen-sourceradix-uireactremixweb-developmentwebflowwebsite-builderwebsite-developmentwebsiteswebstudio
fix: allow searching css with dash e.g. flex-direction (#4996)
Oleg Isonen973d7d609a90
diff --git a/apps/builder/app/builder/shared/css-editor/add-style-input.tsx b/apps/builder/app/builder/shared/css-editor/add-style-input.tsxindex c652dfca2d..3821c1a631 100644--- a/apps/builder/app/builder/shared/css-editor/add-style-input.tsx+++ b/apps/builder/app/builder/shared/css-editor/add-style-input.tsx@@ -100,7 +100,7 @@ const getAutocompleteItems = () => {};const matchOrSuggestToCreate = (search: string, items: Array<SearchItem>) => {- const matched = matchSorter(items, search, {+ const matched = matchSorter(items, search.replaceAll("-", " "), {keys: ["key"],});diff --git a/apps/builder/app/builder/shared/css-editor/css-editor.tsx b/apps/builder/app/builder/shared/css-editor/css-editor.tsxindex 3b7b697b71..6bd5fe2293 100644--- a/apps/builder/app/builder/shared/css-editor/css-editor.tsx+++ b/apps/builder/app/builder/shared/css-editor/css-editor.tsx@@ -389,7 +389,7 @@ export const CssEditor = ({};const handleSearch = (event: ChangeEvent<HTMLInputElement>) => {- const search = event.target.value.trim();+ const search = event.target.value.trim().replaceAll("-", " ");if (search === "") {return handleAbortSearch();}