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
just use nesting selectors instead
Sultan1d85436c129b
diff --git a/apps/designer/app/designer/features/style-panel/controls/select/select-control.tsx b/apps/designer/app/designer/features/style-panel/controls/select/select-control.tsxindex ce705ab512..e363a3f6a2 100644--- a/apps/designer/app/designer/features/style-panel/controls/select/select-control.tsx+++ b/apps/designer/app/designer/features/style-panel/controls/select/select-control.tsx@@ -1,4 +1,4 @@-import { Flex, Select } from "@webstudio-is/design-system";+import { Grid, Select } from "@webstudio-is/design-system";import { getFinalValue } from "../../shared/get-final-value";import { PropertyName } from "../../shared/property-name";import type { ControlProps } from "../../style-sections";@@ -21,30 +21,23 @@ export const SelectControl = ({const setValue = setProperty(styleConfig.property);return (- <Flex align="center" css={{ gap: "var(--space-gap)" }}>- <PropertyName- property={styleConfig.property}- label={styleConfig.label}- css={{- flexBasis: "var(--label-inline, 50%)",- }}- />+ <Grid columns={2}>+ <PropertyName property={styleConfig.property} label={styleConfig.label} /><Selectoptions={styleConfig.items.map(({ label }) => label)}value={String(value.value)}onChange={setValue}ghostcss={{- flexGrow: "var(--select-inline, 1)",gap: "calc($sizes$1 / 2)",px: "calc($sizes$1 + $nudge$3)",height: "$sizes$6",boxShadow: "inset 0 0 0 1px $colors$slate7",textTransform: "capitalize",- fontWeight: "var(--label-weight)",+ fontWeight: "inherit","&:hover": { background: "none" },}}/>- </Flex>+ </Grid>);};diff --git a/apps/designer/app/designer/features/style-panel/sections/layout/layout.tsx b/apps/designer/app/designer/features/style-panel/sections/layout/layout.tsxindex d600aaa5a3..d4752280d4 100644--- a/apps/designer/app/designer/features/style-panel/sections/layout/layout.tsx+++ b/apps/designer/app/designer/features/style-panel/sections/layout/layout.tsx@@ -13,6 +13,19 @@ const layoutSectionStyle = {alignItems: "center",height: "100%",},+ "& [data-property=display]": {+ "& > :first-child": {+ gridTemplateColumns: "auto 1fr",+ gap: "$space$2",+ fontWeight: "500",+ "& > :first-child": {+ flexBasis: "auto",+ },+ "& > :last-child": {+ width: "fit-content",+ },+ },+ },};const layoutSectionFlexStyle = {@@ -39,13 +52,6 @@ const layoutSectionFlexStyle = {},},},- "& [data-property=display]": {- "--space-gap": "$space$2",- "--label-weight": "500",- "--label-inline": "auto",- "--select-inline": "0",- "--select-outline": "none",- },};const LayoutSectionFlex = ({diff --git a/apps/designer/app/designer/features/style-panel/shared/property-name.tsx b/apps/designer/app/designer/features/style-panel/shared/property-name.tsxindex 9afa16a18b..4216db70f9 100644--- a/apps/designer/app/designer/features/style-panel/shared/property-name.tsx+++ b/apps/designer/app/designer/features/style-panel/shared/property-name.tsx@@ -16,7 +16,7 @@ export const PropertyName = ({ property, label, css }: PropertyProps) => {<Labelcss={{gridColumn: "1",- fontWeight: "var(--label-weight, 400)",+ fontWeight: "inherit",...(isCurrentBreakpoint? {color: propertyNameColorForSelectedBreakpoint,