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
Show align-content only if wrap enabled
istarkovc57bebfae8a2
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 839302be58..e30c77fcb5 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@@ -7,6 +7,7 @@ import { renderProperty } from "../../style-sections";import { MenuControl, SelectControl, TextControl } from "../../controls";import { PropertyName } from "../../shared/property-name";import { ColumnGapIcon, RowGapIcon } from "@webstudio-is/icons";+import { getFinalValue } from "../../shared/get-final-value";const LayoutSectionFlex = ({currentStyle,@@ -32,6 +33,18 @@ const LayoutSectionFlex = ({alignContent,].some((config) => config !== undefined);+ const flexWrapValue = getFinalValue({+ currentStyle: flexWrap.currentStyle,+ inheritedStyle: flexWrap.inheritedStyle,+ property: flexWrap.styleConfig.property,+ });++ // From design: Notice that the align-content icon button is not visible by default.+ // This property only applies when flex-wrap is set to "wrap".+ const showAlignContent =+ flexWrapValue?.type === "keyword" &&+ (flexWrapValue.value === "wrap" || flexWrapValue.value === "wrap-reverse");+return (<Flex css={{ flexDirection: "column", gap: "$spacing$5" }}>{display?.styleConfig && (@@ -88,7 +101,7 @@ const LayoutSectionFlex = ({<MenuControl {...justifyContent} /></Box>)}- {alignContent && (+ {alignContent && showAlignContent && (<Box css={{ gridArea: "alignContent" }}><MenuControl {...alignContent} /></Box>