Welcome to mirror list, hosted at ThFree Co, Russian Federation.

code.css « css « assets - github.com/panr/hugo-theme-hello-friend.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: bb459c77bcf537fdc38f97b50f056bf1efa920b8 (plain)
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
96
.collapsable-code {
  position: relative;
  width: 100%;
  margin: 40px 0;

  input[type="checkbox"] {
    position: absolute;
    visibility: hidden;
  }

  input[type="checkbox"]:checked {
    ~ pre,
    ~ .code-toolbar pre {
      height: 0;
      padding: 0;
      border-top: none;
    }

    ~ .code-toolbar {
      padding: 0;
      border-top: none;

      .toolbar {
        display: none;
      }
    }

    ~ label {
      border-radius: 10px;
    }

    ~ label .collapsable-code__toggle:after {
      content: attr(data-label-expand);
    }
  }

  label {
    position: relative;
    display: flex;
    justify-content: space-between;
    background: var(--background-secondary);
    padding: 10px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    min-width: 30px;
    min-height: 30px;
    margin: 0;
    cursor: pointer;
  }

  &__title {
    flex: 1;
    color: var(--color);
    padding: 3px 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
  }

  &__language {
    background: var(--background);
    color: var(--color);
    border-radius: 10px;
    padding: 3px 10px;
  }

  &__toggle {
    color: var(--color);
    font-size: 16px;
    padding: 3px 10px;

    &:after {
      content: attr(data-label-collapse);
    }
  }

  pre {
    margin-top: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 0;

    &::first-line {
      line-height: 0;
    }
  }

  code {
    &::first-line {
      line-height: 0;
    }
  }

  .code-toolbar {
    margin: 0;
  }
}