File tree 5 files changed +41
-7
lines changed
typescript/packages/lookslike-sagas
5 files changed +41
-7
lines changed Original file line number Diff line number Diff line change 10
10
< body class ="theme ">
11
11
< common-screen >
12
12
< common-app >
13
- < common-vstack pad =" md " gap =" md " >
13
+ < common-list >
14
14
< common-media src ="example/mitchell-orr-jQqR2xGkesc-unsplash.jpg ">
15
15
Hello!
16
16
</ common-media >
29
29
< common-media src ="example/mitchell-orr-jQqR2xGkesc-unsplash.jpg ">
30
30
Hello!
31
31
</ common-media >
32
- </ common-vstack >
32
+ </ common-list >
33
33
< div slot ="secondary ">
34
34
< common-suggestion >
35
35
Buy milk
Original file line number Diff line number Diff line change @@ -9,11 +9,14 @@ export class AppElement extends LitElement {
9
9
css `
10
10
:host {
11
11
display: block;
12
+ height: 100%;
13
+ width: 100%;
12
14
}
13
15
14
16
.app {
15
- height: 100cqh;
16
17
display: grid;
18
+ height: 100%;
19
+ width: 100%;
17
20
grid-template-columns: 1fr;
18
21
grid-template-rows: 1fr min-content min-content;
19
22
grid-template-areas:
@@ -32,10 +35,12 @@ export class AppElement extends LitElement {
32
35
33
36
.app-secondary {
34
37
grid-area: secondary;
38
+ container-type: inline-size;
35
39
}
36
40
37
41
.app-search {
38
42
grid-area: search;
43
+ container-type: inline-size;
39
44
background-color: var(--secondary-background);
40
45
display: block;
41
46
padding: var(--gap);
@@ -47,9 +52,7 @@ export class AppElement extends LitElement {
47
52
return html `
48
53
< div class ="app ">
49
54
< main class ="app-primary ">
50
- < common-scroll >
51
- < slot > </ slot >
52
- </ common-scroll >
55
+ < slot > </ slot >
53
56
</ main >
54
57
< nav class ="app-secondary ">
55
58
< slot name ="secondary "> </ slot >
Original file line number Diff line number Diff line change
1
+ import { LitElement , html , css } from "lit" ;
2
+ import { customElement } from "lit/decorators.js" ;
3
+ import { baseStyles } from "../style.js" ;
4
+
5
+ @customElement ( "common-list" )
6
+ export class CommonListElement extends LitElement {
7
+ static override styles = [
8
+ baseStyles ,
9
+ css `
10
+ :host {
11
+ display: block;
12
+ height: 100%;
13
+ width: 100%;
14
+ }
15
+ `
16
+ ] ;
17
+
18
+ override render ( ) {
19
+ return html `
20
+ < common-scroll >
21
+ < common-vstack gap ="md " pad ="md ">
22
+ < slot > </ slot >
23
+ </ common-vstack >
24
+ </ common-scroll >
25
+ ` ;
26
+ }
27
+ }
Original file line number Diff line number Diff line change @@ -9,12 +9,15 @@ export class ScrollElement extends LitElement {
9
9
css `
10
10
:host {
11
11
display: block;
12
+ height: 100%;
13
+ width: 100%;
12
14
}
13
15
14
16
.scroll {
15
17
overflow-y: auto;
16
18
overflow-x: hidden;
17
- height: 100cqh;
19
+ height: 100%;
20
+ width: 100%;
18
21
container-type: size;
19
22
container-name: scroll;
20
23
}
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ export { ScrollElement } from './components/layout/scroll.js';
2
2
export { ScreenElement } from './components/layout/screen.js' ;
3
3
export { VstackElement } from './components/layout/vstack.js' ;
4
4
export { HstackElement } from './components/layout/hstack.js' ;
5
+ export { CommonListElement } from './components/layout/list.js' ;
5
6
export { MediaElement } from './components/common/media.js' ;
6
7
export { ImgElement } from './components/common/img.js' ;
7
8
export { ButtonElement } from './components/common/button.js' ;
You can’t perform that action at this time.
0 commit comments