~nykma/hugo-theme-jane unlisted

ref: f814ff890a58426551dfc30c27e15f7e739d472d hugo-theme-jane/assets/sass/_partial/_post.scss -rw-r--r-- 1.5 KiB View raw
f814ff89Nyk Ma [#][CSS] details summary a month ago
                                                                                
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
// ==============================
// Post
// ==============================

.post {
  padding: 3em 5em;
  margin: 0 5em 3em;

  @import '_post/header';
  @import '_post/toc';
  @import '_post/content';
  @import '_post/copyright';
  @import '_post/reward';
  @import '_post/footer';
  @import '_post/utteranc';
  @import '_post/footnote';
  @import '_post/shortcode_notice';
}

.disqus-comment {
  margin: 0 5em 3em;
  @import '_post/disqus';
}

@media screen and (max-width: 504px) {
  .post {
    padding: 1em 1em;
    margin: 0 0 2em;
  }

  .disqus-comment {
    margin: 0 1em 2em;
  }

  .content-wrapper {
    padding: 1em 0 1px;
  }
}

@media screen and (min-width: 900px) and (max-width: 1080px) {
  .post {
    margin: 0 2em 2em;
  }

  .disqus-comment {
    margin: 0 2em 2em;
  }

  .content-wrapper {
    padding: 2em 0 1px;
  }
}

@media screen and (min-width: 504px) and (max-width: 899px) {
  .post {
    padding: 1em 1em;
    margin: 0 1em 2em;
  }

  .disqus-comment {
    margin: 0 1em 2em;
  }

  .content-wrapper {
    padding: 1em 0 1px;
  }

}

details {
  border: 2px solid $gray;
  border-radius: 4px;
  padding: .5em .5em 0;
}

summary {
  font-weight: bold;
  margin: -.5em -.5em 0;
  padding: .5em;
  background-color: rgba($theme_color, 0.05);
  transition: background-color 0.5s;
}

summary:hover {
  background-color: rgba($theme_color, 0.12);
}

details[open] {
  padding: .5em;
}

details[open] summary {
  border-bottom: 1px solid $gray;
  margin-bottom: .5em;
}