Skip to content

Commit

Permalink
fix: set layout content box size (#29)
Browse files Browse the repository at this point in the history
* fix: set layout content box size

* chore: bump
  • Loading branch information
blidblid authored Mar 31, 2023
1 parent 3824df3 commit b797def
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion libs/angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@berg-layout/angular",
"version": "5.1.2",
"version": "5.1.3",
"devDependencies": {
"@berg-layout/testing": "*"
},
Expand Down
2 changes: 1 addition & 1 deletion libs/core/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name": "@berg-layout/core",
"version": "5.1.2"
"version": "5.1.3"
}
8 changes: 8 additions & 0 deletions libs/core/src/lib/components/layout/layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,14 @@ export class BergLayoutElement extends WebComponent<BergLayoutInputs> {

const shadowRoot = this.shadowRoot ?? this.attachShadow({ mode: 'open' });
shadowRoot.innerHTML = `
<style>
.berg-layout-content {
height: 100%;
width: 100%;
box-sizing: border-box;
}
</style>
<slot name="top"></slot>
<slot name="right"></slot>
<slot name="bottom"></slot>
Expand Down
2 changes: 1 addition & 1 deletion libs/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@berg-layout/react",
"version": "5.1.2",
"version": "5.1.3",
"devDependencies": {
"@berg-layout/testing": "*"
}
Expand Down
4 changes: 4 additions & 0 deletions libs/testing/src/lib/run-layout-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,12 +291,16 @@ export const runLayoutTests = (
},
});

// there is some flake in this spec where the right panel z-index is not updated in time
harness.tickDuration(0);

const backdrop = harness.getAssertedBackdrop('right');
const top = harness.assertedTop;
const right = harness.assertedRight;
const bottom = harness.assertedBottom;
const left = harness.assertedLeft;


expect(parseInt(getComputedStyle(right).zIndex)).toBeGreaterThan(
parseInt(getComputedStyle(backdrop).zIndex)
);
Expand Down

0 comments on commit b797def

Please sign in to comment.