Skip to content

Commit 3eb5b99

Browse files
authored
fix[angular-gen2]: add display: contents to inlined script and inlined styles to not affect flex styles (BuilderIO#3862)
## Description Fixes BuilderIO#3845 _Screenshot_ If relevant, add a screenshot or two of the changes you made.
1 parent 53ae13a commit 3eb5b99

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

.changeset/silly-pigs-confess.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@builder.io/sdk-angular": patch
3+
---
4+
5+
Fix: add `display: contents` to InlinedScript and InlinedStyles components so that they don't affect flex styles

packages/sdks/overrides/angular/src/components/inlined-script.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ interface Props {
2020
template: ``,
2121
standalone: true,
2222
imports: [CommonModule],
23+
styles: [
24+
`
25+
:host {
26+
display: contents;
27+
}
28+
`,
29+
],
2330
})
2431
export default class InlinedScript {
2532
@Input() scriptStr!: Props['scriptStr'];

packages/sdks/overrides/angular/src/components/inlined-styles.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ interface Props {
1414
template: ``,
1515
standalone: true,
1616
imports: [CommonModule],
17+
styles: [
18+
`
19+
:host {
20+
display: contents;
21+
}
22+
`,
23+
],
1724
})
1825
export default class InlinedStyles {
1926
@Input() styles!: Props['styles'];

0 commit comments

Comments
 (0)