Skip to content

Commit cd5a78a

Browse files
svg sizing hotfix
1 parent c890401 commit cd5a78a

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

  • packages/builder-web-core/widgets-native/html-svg

packages/builder-web-core/widgets-native/html-svg/index.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,17 @@ export class SvgElement extends StylableJsxWidget {
200200
};
201201
}
202202

203+
// @override
204+
get finalStyle() {
205+
return {
206+
...super.finalStyle,
207+
// TODO: this is a hot fix of svg & path's constraint handling
208+
// width & height for the svg must be preserved. (it wont' follow the constraints anyway.)
209+
width: css.length(this.width),
210+
height: css.length(this.height),
211+
};
212+
}
213+
203214
jsxConfig(): StylableJSXElementConfig | UnstylableJSXElementConfig {
204215
return <StylableJSXElementConfig>{
205216
type: "tag-and-attr",

0 commit comments

Comments
 (0)