Skip to content

Commit

Permalink
Wraps ‹dia-po› contents in a self-centering ‹div› (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
olange committed Mar 9, 2019
1 parent 054a41b commit 6ec6851
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
9 changes: 7 additions & 2 deletions demos/dia-show.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,13 @@
<main>
<dia-show slide="s01" display="tv02">
<dia-slide id="s01">
<dia-po display="proj01"><h1>This is slide `s01` displayed on `proj01`</h1></dia-po>
<dia-po display="tv01"></dia-po>
<dia-po display="proj01">
<h1>This is slide `s01` displayed on `proj01`</h1>
<p>Some text</p>
</dia-po>
<dia-po display="tv01">
<p>Some more text</p>
</dia-po>
<dia-po display="tv02" default>Default s01 diapo on tv02</dia-po>
<dia-po display="pres01"></dia-po>
<dia-po display="pres02"></dia-po>
Expand Down
4 changes: 1 addition & 3 deletions packages/dia-show/dia-po.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ export class DiaPo extends LitElement {

render() {
return html`
<slot>
<div>‹dia-po ${this.display}</div>
</slot>
<div><slot>‹dia-po ${this.display}</slot></div>
`;
}

Expand Down
2 changes: 2 additions & 0 deletions packages/dia-show/shared-styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ const
display: flex; flex-direction: column;
flex-grow: 1; box-sizing: border-box;
background-color: var(--background-color, white);
align-items: center;
justify-content: center;
}
:host([ default]) {
box-shadow: 1px 1px 5px 1px #dfdfdf;
Expand Down

0 comments on commit 6ec6851

Please sign in to comment.