Skip to content

Commit

Permalink
Initial flex grid layout (#3 / WIP)
Browse files Browse the repository at this point in the history
  • Loading branch information
olange committed Mar 5, 2019
1 parent 2d1ce01 commit 33ba3f2
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 4 deletions.
13 changes: 12 additions & 1 deletion packages/slideshow/dia-po.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
import { LitElement, html, css } from "lit-element";
import { LitElement, html } from "lit-element";
import { CommonStyles, DiaPoStyles } from "./shared-styles.js";

export class DiaPo extends LitElement {
static get styles() {
return [ CommonStyles, DiaPoStyles ];
};

render() {
return html`
<div>‹dia-po›</div>
<slot></slot>
`;
}

}

Expand Down
13 changes: 12 additions & 1 deletion packages/slideshow/dia-show.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
import { LitElement, html, css } from "lit-element";
import { LitElement, html } from "lit-element";
import { CommonStyles, DiaShowStyles } from "./shared-styles.js";

export class DiaShow extends LitElement {
static get styles() {
return [ CommonStyles, DiaShowStyles ];
};

render() {
return html`
<div>‹dia-show›</div>
<slot></slot>
`;
}

}

Expand Down
13 changes: 12 additions & 1 deletion packages/slideshow/dia-slide.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
import { LitElement, html, css } from "lit-element";
import { LitElement, html } from "lit-element";
import { CommonStyles, DiaSlideStyles } from "./shared-styles.js";

export class DiaSlide extends LitElement {
static get styles() {
return [ CommonStyles, DiaSlideStyles ];
};

render() {
return html`
<div>‹dia-slide›</div>
<slot></slot>
`;
}

}

Expand Down
13 changes: 12 additions & 1 deletion packages/slideshow/dia-speaker.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
import { LitElement, html, css } from "lit-element";
import { LitElement, html } from "lit-element";
import { CommonStyles, DiaSpeakerStyles } from "./shared-styles.js";

export class DiaSpeaker extends LitElement {
static get styles() {
return [ CommonStyles, DiaSpeakerStyles ];
};

render() {
return html`
<div>‹dia-speaker›</div>
<slot></slot>
`;
}

}

Expand Down
36 changes: 36 additions & 0 deletions packages/slideshow/shared-styles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { css } from "lit-element";

const
CommonStyles = css`
:host[ hidden] { display: none }
`,
DiaShowStyles = css`
:host {
display: flex; flex-direction: column;
flex-grow: 1;
background-color: lightgray
}
`,
DiaSlideStyles = css`
:host {
display: flex; flex-grow: 1;
background-color: red
}
`,
DiaPoStyles = css`
:host {
display: flex; flex-direction: column;
flex-grow: 1;
background-color: green }
`,
DiaSpeakerStyles = css`
:host { display: block }
`;

export {
CommonStyles,
DiaShowStyles,
DiaSlideStyles,
DiaPoStyles,
DiaSpeakerStyles
};

0 comments on commit 33ba3f2

Please sign in to comment.