aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/assets/css/jekyll-theme/posts.css
blob: b24cbb7c3f0b0e9dd3a00065505590f98eaa34f3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/* On the sidebar, the date is always beside the header.
 * On smaller devices, the date is always beneath the header.
 * On the post page, the date is beside the header or wraps to the next line on
 * larger devices.
 * In the feed, the date is always beside the header on larger devices. */
@media (min-width: 768px) {
  .post-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    column-gap: 1em;
  }
  :not(.feed-entry) > .post-header {
    flex-wrap: wrap;
  }
}
.list-group-item .post-header {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  justify-content: space-between;
  column-gap: 1em;
}

.post-date {
  flex: none;
}
.post-date .category {
  margin-right: .5em;
}

.feed-entry {
  /* The entire feed entry is a link now. */
  display: block;
  position: relative;
  color: inherit !important;
  /* Don't use an actual <hr>, it's margins are too big, use a border instead.
   * The color of <hr>. */
  border-bottom: 3px solid #eee;
}
@media (min-width: 480px) {
  /* If the screen width allows for it, add some padding on the sides. */
  .feed-entry {
    padding-left: 11px;
    padding-right: 11px;
  }
}
.feed-entry:hover, .feed-entry:focus {
  /* Obviously, don't underline anything. The :focus case can be reproduced by
   * long-pressing the link on Android, then dismissing the popup and long-
   * pressing another link. */
  text-decoration: none;
}
.feed-entry:hover {
  /* This is the .list-group-item:hover background color. */
  background-color: #f5f5f5;
}

.feed-entry h3 {
  /* This is pretty funny and tragic, as is always the case with CSS.
   * Android's Chrome thinks that it's not necessary to highlight the top
   * margin (reproducible by long-pressing the link), _but_ it does highlight
   * the top padding. This is obviously a browser bug. */

  /* Also, set the value to a lower one, it's better that way. */
  margin-top: 0;
  padding-top: 16px;
}
.feed-entry {
  /* Add some padding on the bottom to match the top value. */
  padding-bottom: 5px;
}

.pagination {
  /* In my layout, there's always something under the paginator, and it always
   * has a top margin, and the margins _never_ collapse. */
  margin-bottom: 0;
}