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
remove white square from svgs, improve styling
Sultan626956e04940
diff --git a/apps/designer/app/designer/features/style-panel/style-section.tsx b/apps/designer/app/designer/features/style-panel/style-section.tsxindex 524cebda2b..2a1f264215 100644--- a/apps/designer/app/designer/features/style-panel/style-section.tsx+++ b/apps/designer/app/designer/features/style-panel/style-section.tsx@@ -25,6 +25,7 @@ import {type StyleProperty,type Category,type StyleValue,+ type CSS,} from "@webstudio-is/react-sdk";import type { SetProperty } from "./lib/use-style-data";import type { InheritedStyle } from "./lib/get-inherited-style";@@ -58,9 +59,10 @@ const getFinalValue = ({type PropertyProps = {property: StyleProperty;label: string;+ css?: CSS;};-const PropertyName = ({ property, label }: PropertyProps) => {+const PropertyName = ({ property, label, css }: PropertyProps) => {const isCurrentBreakpoint = useIsFromCurrentBreakpoint(property);return (@@ -70,6 +72,7 @@ const PropertyName = ({ property, label }: PropertyProps) => {color: isCurrentBreakpoint? propertyNameColorForSelectedBreakpoint: "$hiContrast",+ ...css,}}variant="contrast"size="1"@@ -258,7 +261,11 @@ const SelectControl = ({return (<>- <PropertyName property={styleConfig.property} label={styleConfig.label} />+ <PropertyName+ property={styleConfig.property}+ label={styleConfig.label}+ css={{ fontWeight: "500", marginRight: "8px" }}+ /><Selectoptions={styleConfig.items.map(({ label }) => label)}value={String(value.value)}@@ -297,7 +304,7 @@ const ComboiconControl = ({);};-const GridControl = ({ css, currentStyle }: any) => {+const GridControl = ({ css, currentStyle, ...rest }: any) => {return (<Boxcss={{@@ -305,18 +312,19 @@ const GridControl = ({ css, currentStyle }: any) => {background: "#FFF",borderRadius: "4px",textAlign: "center",- width: "72px",+ width: "100%",height: "72px",...css,}}+ {...rest}></Box>);return <></>;};-const LockControl = ({ css, currentStyle, setProperty }: any) => {+const LockControl = ({ css, currentStyle, setProperty, ...rest }: any) => {return (- <IconButton css={{ width: "100%", ...css }}>+ <IconButton css={{ width: "100%", ...css }} {...rest}><icons.lock.closed /></IconButton>);@@ -364,7 +372,7 @@ export const renderProperty = ({return (<Boxkey={key}- data-category={category}+ data-type={styleConfig.control.toLowerCase()}data-property={property}css={{ gridArea: property }}>@@ -408,21 +416,33 @@ export const renderCategory = ({gridTemplateRows: "auto auto auto auto",gridTemplateAreas: `"display display display display display display display display display display display display"- "grid grid grid grid flexDirection flexDirection flexWrap flexWrap justifyItems justifyItems . ."- "grid grid grid grid alignItems alignItems justifyContent justifyContent alignContent alignContent . ."+ "grid grid grid grid grid flexDirection flexDirection flexWrap flexWrap justifyItems justifyItems ."+ "grid grid grid grid grid alignItems alignItems justifyContent justifyContent alignContent alignContent .""rowGap rowGap rowGap rowGap rowGap lock lock columnGap columnGap columnGap columnGap columnGap"`,- "[data-property=placeContent]": {+ gap: "8px 4px",+ "& > [data-type=comboicon]": {+ display: "flex",+ justifyContent: "center",+ height: "100%",+ },+ // @todo placeContent is shorthand prop for other properties, thus a duplicate+ "& > [data-property=placeContent]": {+ display: "none",+ },+ "& > [data-property=justifyItems]": {display: "none",},}}><GridControl+ data-property="grid"css={{ gridArea: "grid" }}currentStyle={currentStyle}setProperty={setProperty}/><LockControl+ data-property="lock"css={{ gridArea: "lock" }}currentStyle={currentStyle}setProperty={setProperty}diff --git a/apps/designer/app/shared/design-system/components/comboicon.tsx b/apps/designer/app/shared/design-system/components/comboicon.tsxindex a7941cca4d..72abfa0061 100644--- a/apps/designer/app/shared/design-system/components/comboicon.tsx+++ b/apps/designer/app/shared/design-system/components/comboicon.tsx@@ -47,14 +47,15 @@ const IconButton = styled("button", {all: "unset",fontFamily: "inherit",borderRadius: "2px",- height: "32px",- width: "32px",+ height: "100%",+ width: "100%",display: "inline-flex",alignItems: "center",justifyContent: "center",color: "$colors$gray12",backgroundColor: "white",- "&:hover": { backgroundColor: "$colors$gray6" },+ "&:hover": { backgroundColor: "$colors$gray3" },+ "& svg": { width: "24px", height: "24px" },});export const Comboicon = ({ id, value, items, onChange, children }: any) => {diff --git a/apps/designer/app/shared/icons/align-content.tsx b/apps/designer/app/shared/icons/align-content.tsxindex 1a9f45a53b..93fd7d4471 100644--- a/apps/designer/app/shared/icons/align-content.tsx+++ b/apps/designer/app/shared/icons/align-content.tsx@@ -11,10 +11,6 @@ export const AlignContentStart = React.forwardRef<SVGSVGElement, IconProps>({...props}ref={forwardedRef}>- <path- d="M0 2C0 0.89543 0.895431 0 2 0H22C23.1046 0 24 0.895431 24 2V22C24 23.1046 23.1046 24 22 24H2C0.89543 24 0 23.1046 0 22V2Z"- fill="white"- /><path d="M4 6H20V7H4V6Z" fill="#11181C" /><path d="M8 9H11V12H8V9Z" fill="#11181C" /><path d="M16 9H13V12H16V9Z" fill="#11181C" />@@ -35,10 +31,6 @@ export const AlignContentCenter = React.forwardRef<SVGSVGElement, IconProps>({...props}ref={forwardedRef}>- <path- d="M0 2C0 0.89543 0.895431 0 2 0H22C23.1046 0 24 0.895431 24 2V22C24 23.1046 23.1046 24 22 24H2C0.89543 24 0 23.1046 0 22V2Z"- fill="white"- /><pathfillRule="evenodd"clipRule="evenodd"@@ -60,10 +52,6 @@ export const AlignContentEnd = React.forwardRef<SVGSVGElement, IconProps>({...props}ref={forwardedRef}>- <path- d="M0 2C0 0.89543 0.895431 0 2 0H22C23.1046 0 24 0.895431 24 2V22C24 23.1046 23.1046 24 22 24H2C0.89543 24 0 23.1046 0 22V2Z"- fill="white"- /><pathfillRule="evenodd"clipRule="evenodd"@@ -85,10 +73,6 @@ export const AlignContentStretch = React.forwardRef<SVGSVGElement, IconProps>({...props}ref={forwardedRef}>- <path- d="M0 2C0 0.89543 0.895431 0 2 0H22C23.1046 0 24 0.895431 24 2V22C24 23.1046 23.1046 24 22 24H2C0.89543 24 0 23.1046 0 22V2Z"- fill="white"- /><pathfillRule="evenodd"clipRule="evenodd"@@ -112,10 +96,6 @@ export const AlignContentSpaceAround = React.forwardRef<{...props}ref={forwardedRef}>- <path- d="M0 2C0 0.89543 0.895431 0 2 0H22C23.1046 0 24 0.895431 24 2V22C24 23.1046 23.1046 24 22 24H2C0.89543 24 0 23.1046 0 22V2Z"- fill="white"- /><pathfillRule="evenodd"clipRule="evenodd"@@ -138,10 +118,6 @@ export const AlignContentSpaceBetween = React.forwardRef<{...props}ref={forwardedRef}>- <path- d="M0 2C0 0.89543 0.895431 0 2 0H22C23.1046 0 24 0.895431 24 2V22C24 23.1046 23.1046 24 22 24H2C0.89543 24 0 23.1046 0 22V2Z"- fill="white"- /><pathfillRule="evenodd"clipRule="evenodd"diff --git a/apps/designer/app/shared/icons/align-items.tsx b/apps/designer/app/shared/icons/align-items.tsxindex 4a89e997f3..1ae3919c1e 100644--- a/apps/designer/app/shared/icons/align-items.tsx+++ b/apps/designer/app/shared/icons/align-items.tsx@@ -11,10 +11,6 @@ export const AlignItemsStart = React.forwardRef<SVGSVGElement, IconProps>({...props}ref={forwardedRef}>- <path- d="M0 2C0 0.89543 0.895431 0 2 0H22C23.1046 0 24 0.895431 24 2V22C24 23.1046 23.1046 24 22 24H2C0.89543 24 0 23.1046 0 22V2Z"- fill="white"- /><pathfillRule="evenodd"clipRule="evenodd"@@ -36,10 +32,6 @@ export const AlignItemsEnd = React.forwardRef<SVGSVGElement, IconProps>({...props}ref={forwardedRef}>- <path- d="M0 2C0 0.89543 0.895431 0 2 0H22C23.1046 0 24 0.895431 24 2V22C24 23.1046 23.1046 24 22 24H2C0.89543 24 0 23.1046 0 22V2Z"- fill="white"- /><pathfillRule="evenodd"clipRule="evenodd"@@ -61,10 +53,6 @@ export const AlignItemsCenter = React.forwardRef<SVGSVGElement, IconProps>({...props}ref={forwardedRef}>- <path- d="M0 2C0 0.89543 0.895431 0 2 0H22C23.1046 0 24 0.895431 24 2V22C24 23.1046 23.1046 24 22 24H2C0.89543 24 0 23.1046 0 22V2Z"- fill="white"- /><pathfillRule="evenodd"clipRule="evenodd"@@ -86,10 +74,6 @@ export const AlignItemsBaseline = React.forwardRef<SVGSVGElement, IconProps>({...props}ref={forwardedRef}>- <path- d="M0 2C0 0.89543 0.895431 0 2 0H22C23.1046 0 24 0.895431 24 2V22C24 23.1046 23.1046 24 22 24H2C0.89543 24 0 23.1046 0 22V2Z"- fill="white"- /><pathfillRule="evenodd"clipRule="evenodd"@@ -137,10 +121,6 @@ export const AlignItemsStretch = React.forwardRef<SVGSVGElement, IconProps>({...props}ref={forwardedRef}>- <path- d="M0 2C0 0.89543 0.895431 0 2 0H22C23.1046 0 24 0.895431 24 2V22C24 23.1046 23.1046 24 22 24H2C0.89543 24 0 23.1046 0 22V2Z"- fill="white"- /><pathfillRule="evenodd"clipRule="evenodd"diff --git a/apps/designer/app/shared/icons/flex-direction.tsx b/apps/designer/app/shared/icons/flex-direction.tsxindex 5da2044520..5823b6e01c 100644--- a/apps/designer/app/shared/icons/flex-direction.tsx+++ b/apps/designer/app/shared/icons/flex-direction.tsx@@ -60,10 +60,6 @@ export const FlexDirectionRowReverse = React.forwardRef<ref={forwardedRef}style={{ transform: "rotate(180deg)" }}>- <path- d="M2 24C0.89543 24 -3.91405e-08 23.1046 -8.74228e-08 22L-9.61651e-07 2C-1.00993e-06 0.89543 0.89543 -3.91405e-08 2 -8.74228e-08L22 -9.61651e-07C23.1046 -1.00993e-06 24 0.89543 24 2L24 22C24 23.1046 23.1046 24 22 24L2 24Z"- fill="white"- /><pathd="M5 12.8334L14.8881 12.8334L11.9794 15.825L13.125 17L18 12L13.125 7.00003L11.9794 8.17503L14.8881 11.1667L5 11.1667V12.8334Z"fill="#11181C"@@ -85,10 +81,6 @@ export const FlexDirectionColumnReverse = React.forwardRef<ref={forwardedRef}style={{ transform: "rotate(180deg)" }}>- <path- d="M2 24C0.89543 24 -3.91405e-08 23.1046 -8.74228e-08 22L-9.61651e-07 2C-1.00993e-06 0.89543 0.89543 -3.91405e-08 2 -8.74228e-08L22 -9.61651e-07C23.1046 -1.00993e-06 24 0.89543 24 2L24 22C24 23.1046 23.1046 24 22 24L2 24Z"- fill="white"- /><pathd="M11.1667 6L11.1667 15.8881L8.175 12.9794L7 14.125L12 19L17 14.125L15.825 12.9794L12.8333 15.8881L12.8333 6L11.1667 6Z"fill="#11181C"diff --git a/apps/designer/app/shared/icons/flex-wrap.tsx b/apps/designer/app/shared/icons/flex-wrap.tsxindex a8641acaf8..e6e43c5ae4 100644--- a/apps/designer/app/shared/icons/flex-wrap.tsx+++ b/apps/designer/app/shared/icons/flex-wrap.tsx@@ -11,10 +11,6 @@ export const FlexWrapWrap = React.forwardRef<SVGSVGElement, IconProps>({...props}ref={forwardedRef}>- <path- d="M0 2C0 0.89543 0.895431 0 2 0H22C23.1046 0 24 0.895431 24 2V22C24 23.1046 23.1046 24 22 24H2C0.89543 24 0 23.1046 0 22V2Z"- fill="white"- /><path d="M16 13H20V20H16V13Z" fill="#11181C" /><path d="M4 13H8V20H4V13Z" fill="#11181C" /><path d="M10 13H14V20H10V13Z" fill="#11181C" />@@ -39,10 +35,6 @@ export const FlexWrapNowrap = React.forwardRef<SVGSVGElement, IconProps>({...props}ref={forwardedRef}>- <path- d="M0 2C0 0.89543 0.895431 0 2 0H22C23.1046 0 24 0.895431 24 2V22C24 23.1046 23.1046 24 22 24H2C0.89543 24 0 23.1046 0 22V2Z"- fill="white"- /><pathfillRule="evenodd"clipRule="evenodd"@@ -65,10 +57,6 @@ export const FlexWrapWrapReverse = React.forwardRef<SVGSVGElement, IconProps>(ref={forwardedRef}style={{ transform: "rotate(180deg)" }}>- <path- d="M0 2C0 0.89543 0.895431 0 2 0H22C23.1046 0 24 0.895431 24 2V22C24 23.1046 23.1046 24 22 24H2C0.89543 24 0 23.1046 0 22V2Z"- fill="white"- /><path d="M16 13H20V20H16V13Z" fill="#11181C" /><path d="M4 13H8V20H4V13Z" fill="#11181C" /><path d="M10 13H14V20H10V13Z" fill="#11181C" />diff --git a/apps/designer/app/shared/icons/justify-content.tsx b/apps/designer/app/shared/icons/justify-content.tsxindex 6acf4c9599..02692b9c3e 100644--- a/apps/designer/app/shared/icons/justify-content.tsx+++ b/apps/designer/app/shared/icons/justify-content.tsx@@ -11,10 +11,6 @@ export const JustifyContentStart = React.forwardRef<SVGSVGElement, IconProps>({...props}ref={forwardedRef}>- <path- d="M0 2C0 0.89543 0.895431 0 2 0H22C23.1046 0 24 0.895431 24 2V22C24 23.1046 23.1046 24 22 24H2C0.89543 24 0 23.1046 0 22V2Z"- fill="white"- /><pathd="M10.9999 7.19999H8.79995V4.79999H7.19995V19.2H8.79995V16.8H10.9999V7.19999Z"fill="#11181C"@@ -35,10 +31,6 @@ export const JustifyContentCenter = React.forwardRef<SVGSVGElement, IconProps>({...props}ref={forwardedRef}>- <path- d="M0 2C0 0.89543 0.895431 0 2 0H22C23.1046 0 24 0.895431 24 2V22C24 23.1046 23.1046 24 22 24H2C0.89543 24 0 23.1046 0 22V2Z"- fill="white"- /><pathfillRule="evenodd"clipRule="evenodd"@@ -60,10 +52,6 @@ export const JustifyContentEnd = React.forwardRef<SVGSVGElement, IconProps>({...props}ref={forwardedRef}>- <path- d="M0 2C0 0.89543 0.895431 0 2 0H22C23.1046 0 24 0.895431 24 2V22C24 23.1046 23.1046 24 22 24H2C0.89543 24 0 23.1046 0 22V2Z"- fill="white"- /><pathd="M12 16.8H15.2V19.2H16.8V4.79999H15.2V7.19999H12V16.8Z"fill="#11181C"@@ -86,10 +74,6 @@ export const JustifyContentSpaceBetween = React.forwardRef<{...props}ref={forwardedRef}>- <path- d="M0 2C0 0.89543 0.895431 0 2 0H22C23.1046 0 24 0.895431 24 2V22C24 23.1046 23.1046 24 22 24H2C0.89543 24 0 23.1046 0 22V2Z"- fill="white"- /><pathfillRule="evenodd"clipRule="evenodd"@@ -112,10 +96,6 @@ export const JustifyContentSpaceAround = React.forwardRef<{...props}ref={forwardedRef}>- <path- d="M0 2C0 0.89543 0.895431 0 2 0H22C23.1046 0 24 0.895431 24 2V22C24 23.1046 23.1046 24 22 24H2C0.89543 24 0 23.1046 0 22V2Z"- fill="white"- /><path d="M7.9999 19.2V4.79999H6.3999V19.2H7.9999Z" fill="#11181C" /><path d="M17.5999 19.2V4.79999H15.9999V19.2H17.5999Z" fill="#11181C" /><path d="M15.1999 16.8H12.7999V7.19999H15.1999V16.8Z" fill="#11181C" />