Commit 8c00d2692c05faece6e79ee8158e2cbf6612e078
refactor common Scroller style out
mix committed on 1/25/2018, 3:43:01 AMParent: aa4c25f3c365e275c42b08f8e34ef4e6c2b66d93
Files changed
app/html/scroller.mcss | changed |
app/page/blogIndex.mcss | changed |
app/page/blogSearch.mcss | changed |
app/page/blogShow.js | changed |
app/page/blogShow.mcss | changed |
app/page/userShow.mcss | changed |
app/page/addressBook.mcss | added |
app/html/scroller.mcss | ||
---|---|---|
@@ -1,34 +1,38 @@ | ||
1 | 1 | Scroller { |
2 | - | |
3 | 2 | overflow: auto |
4 | 3 | width: 100% |
5 | 4 | height: 100% |
6 | 5 | min-height: 0px |
7 | 6 | |
8 | - /* div.wrapper { */ | |
9 | - /* align-self: center */ | |
7 | + section.top { | |
8 | + /* position: sticky */ | |
9 | + left: 0 | |
10 | + right: 0 | |
11 | + top: 0 | |
12 | + z-index: 99 | |
10 | 13 | |
11 | - /* flex: 1 1 */ | |
12 | - /* $threadWidth */ | |
13 | - /* padding-top: .5rem */ | |
14 | + background-color: #fff | |
15 | + } | |
14 | 16 | |
15 | - /* section.content { */ | |
16 | - /* div { */ | |
17 | - /* border-bottom: solid 1px gainsboro */ | |
18 | - /* } */ | |
19 | - /* } */ | |
20 | - /* } */ | |
21 | -} | |
17 | + section.content { | |
18 | + background-color: #fff | |
19 | + $maxWidth | |
20 | + margin: .8rem auto | |
21 | + padding: .5rem 2rem | |
22 | 22 | |
23 | -Scroller -errors { | |
24 | - div.wrapper { | |
25 | - width: initial | |
26 | - max-width: 100% | |
23 | + display: flex | |
24 | + flex-wrap: wrap | |
27 | 25 | |
28 | - section.content div { | |
29 | - border: none | |
30 | - } | |
31 | 26 | } |
27 | + | |
28 | + section.bottom { | |
29 | + } | |
32 | 30 | } |
33 | 31 | |
32 | +/* Scroller -errors { */ | |
33 | +/* section.content div { */ | |
34 | +/* border: none */ | |
35 | +/* } */ | |
36 | +/* } */ | |
34 | 37 | |
38 | + |
app/page/blogIndex.mcss | ||
---|---|---|
@@ -1,28 +1,13 @@ | ||
1 | 1 | Page -blogIndex { |
2 | - div.content { padding: 0 } | |
2 | + div.content.Scroller { | |
3 | + padding: 0 | |
3 | 4 | |
4 | - div.Scroller.content { | |
5 | - | |
6 | 5 | section.top { |
7 | 6 | position: sticky |
8 | - left: 0 | |
9 | - right: 0 | |
10 | - top: 0 | |
11 | - z-index: 99 | |
12 | - | |
13 | - background-color: #fff | |
14 | 7 | } |
15 | 8 | |
16 | 9 | section.content { |
17 | - background-color: #fff | |
18 | - $maxWidth | |
19 | - margin: .8rem auto | |
20 | - padding: .5rem 2rem | |
21 | - | |
22 | - display: flex | |
23 | - flex-wrap: wrap | |
24 | - | |
25 | 10 | div.BlogCard { |
26 | 11 | flex-basis: 100% |
27 | 12 | border-bottom: 1px solid rgba(0,0,0, .1) |
28 | 13 | } |
app/page/blogSearch.mcss | ||
---|---|---|
@@ -1,18 +1,11 @@ | ||
1 | 1 | Page -blogSearch { |
2 | - div.content { padding: 0 } | |
2 | + div.content.Scroller { | |
3 | + padding: 0 | |
3 | 4 | |
4 | - div.Scroller.content { | |
5 | - | |
6 | 5 | section.top { |
7 | 6 | position: sticky |
8 | - left: 0 | |
9 | - right: 0 | |
10 | - top: 0 | |
11 | - z-index: 99 | |
12 | 7 | |
13 | - background-color: #fff | |
14 | - | |
15 | 8 | div.search { |
16 | 9 | border-top: 1px solid gainsboro |
17 | 10 | border-bottom: 2px solid #f5f6f7 |
18 | 11 | padding: 1rem |
@@ -50,16 +43,8 @@ | ||
50 | 43 | } |
51 | 44 | } |
52 | 45 | |
53 | 46 | section.content { |
54 | - background-color: #fff | |
55 | - $maxWidth | |
56 | - padding: .5rem 2rem | |
57 | - margin: .8rem auto | |
58 | - | |
59 | - display: flex | |
60 | - flex-wrap: wrap | |
61 | - | |
62 | 47 | div.BlogCard { |
63 | 48 | flex-basis: 100% |
64 | 49 | |
65 | 50 | border-bottom: 1px solid gainsboro |
app/page/blogShow.js | ||
---|---|---|
@@ -40,9 +40,9 @@ | ||
40 | 40 | const { timeago, channel, markdown, compose } = api.message.html |
41 | 41 | |
42 | 42 | return h('Page -blogShow', [ |
43 | 43 | api.app.html.sideNav({ page: 'discover' }), // HACK to highlight discover |
44 | - h('div.content', [ | |
44 | + h('Scroller.content', [ | |
45 | 45 | h('section.top', [ |
46 | 46 | api.app.html.topNav(location) |
47 | 47 | ]), |
48 | 48 | h('section.content', [ |
app/page/blogShow.mcss | ||
---|---|---|
@@ -1,35 +1,35 @@ | ||
1 | 1 | Page -blogShow { |
2 | 2 | // div.context {} |
3 | 3 | |
4 | - div.content { | |
4 | + div.Scroller.content { | |
5 | 5 | padding: 0 |
6 | 6 | section.top { |
7 | 7 | position: sticky |
8 | - left: 0 | |
9 | - right: 0 | |
10 | - /* top: 0 */ | |
11 | - background-color: #fff | |
8 | + top: initial | |
12 | 9 | |
13 | 10 | div.blogHeader { |
14 | 11 | } |
15 | 12 | } |
16 | 13 | |
17 | 14 | section.content { |
18 | - $maxWidth | |
15 | + background-color: initial | |
19 | 16 | padding: .8rem |
20 | - margin: 0 auto | |
17 | + margin: 1rem auto | |
21 | 18 | |
19 | + display: flex | |
20 | + | |
22 | 21 | header { |
23 | 22 | $backgroundPrimaryText |
23 | + flex-basis: 100% | |
24 | 24 | padding: 1.5rem |
25 | 25 | |
26 | 26 | display: flex |
27 | 27 | |
28 | 28 | div.blog { |
29 | 29 | display: flex |
30 | 30 | flex-wrap: wrap |
31 | - flex-grow: 1 | |
31 | + flex-basis: 100% | |
32 | 32 | align-items: center |
33 | 33 | |
34 | 34 | h1 { |
35 | 35 | flex-basis: 100% |
@@ -71,8 +71,9 @@ | ||
71 | 71 | } |
72 | 72 | |
73 | 73 | div.break { |
74 | 74 | padding: 0 1.5rem |
75 | + flex-basis: 100% | |
75 | 76 | $backgroundPrimaryText |
76 | 77 | |
77 | 78 | hr { |
78 | 79 | margin: 0 |
@@ -88,8 +89,9 @@ | ||
88 | 89 | margin-bottom: 1.5rem |
89 | 90 | } |
90 | 91 | |
91 | 92 | div.Comments { |
93 | + flex-basis: 100% | |
92 | 94 | } |
93 | 95 | } |
94 | 96 | } |
95 | 97 | } |
app/page/userShow.mcss | ||
---|---|---|
@@ -1,12 +1,11 @@ | ||
1 | 1 | Page -userShow { |
2 | - div.content { padding: 0 } | |
2 | + div.content.Scroller { | |
3 | + padding: 0 | |
3 | 4 | |
4 | - div.Scroller.content { | |
5 | 5 | section.top { |
6 | 6 | section.about { |
7 | - margin-top: 4rem | |
8 | - margin-bottom: 4rem | |
7 | + padding: 4rem 0 | |
9 | 8 | |
10 | 9 | display: flex |
11 | 10 | flex-direction: column |
12 | 11 | align-items: center |
@@ -45,20 +44,11 @@ | ||
45 | 44 | } |
46 | 45 | } |
47 | 46 | |
48 | 47 | section.content { |
49 | - background-color: #fff | |
50 | - $maxWidth | |
51 | - margin: .8rem auto | |
52 | - padding: .5rem 2rem | |
53 | - | |
54 | - display: flex | |
55 | - flex-wrap: wrap | |
56 | - | |
57 | 48 | div.BlogCard { |
58 | 49 | flex-basis: 100% |
59 | 50 | border-bottom: 1px solid rgba(0,0,0, .1) |
60 | - /* margin-bottom: .5rem */ | |
61 | 51 | |
62 | 52 | div.context { |
63 | 53 | div.Link { display: none } |
64 | 54 | div.name { display: none } |
app/page/addressBook.mcss | ||
---|---|---|
@@ -1,0 +1,24 @@ | ||
1 | +Page -blogIndex { | |
2 | + div.content.Scroller { | |
3 | + padding: 0 | |
4 | + | |
5 | + section.top { | |
6 | + position: sticky | |
7 | + } | |
8 | + | |
9 | + section.content { | |
10 | + div.BlogCard { | |
11 | + flex-basis: 100% | |
12 | + border-bottom: 1px solid rgba(0,0,0, .1) | |
13 | + } | |
14 | + } | |
15 | + | |
16 | + section.bottom { | |
17 | + div.Button { | |
18 | + margin: 1rem 0 | |
19 | + } | |
20 | + } | |
21 | + } | |
22 | +} | |
23 | + | |
24 | + |
Built with git-ssb-web