aboutsummaryrefslogtreecommitdiff
path: root/assets/_shortcodes.scss
blob: 62a8b90e102ec04e1fad45ffa5c589e5fb6234ec (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
97
98
99
100
101
.markdown {
  // {{< expand "Label" "icon" >}}
  .book-expand {
    margin-top: $padding-16;
    margin-bottom: $padding-16;

    border: $padding-1 solid $gray-200;
    border-radius: $border-radius;

    overflow: hidden;

    .book-expand-head {
      background: $gray-100;
      padding: $padding-8 $padding-16;
      cursor: pointer;
    }

    .book-expand-content {
      display: none;
      padding: $padding-16;
    }

    input[type="checkbox"]:checked + .book-expand-content {
      display: block;
    }
  }

  // {{< tabs >}}
  .book-tabs {
    margin-top: $padding-16;
    margin-bottom: $padding-16;

    border: $padding-1 solid $gray-200;
    border-radius: $border-radius;

    overflow: hidden;

    display: flex;
    flex-wrap: wrap;

    label {
      display: inline-block;
      padding: $padding-8 $padding-16;
      border-bottom: $padding-1 transparent;
      cursor: pointer;
    }

    .book-tabs-content {
      order: 999; //Move content blocks to the end
      width: 100%;
      border-top: $padding-1 solid $gray-100;
      padding: $padding-16;
      display: none;
    }

    input[type="radio"]:checked + label {
      border-bottom: $padding-1 solid $color-link;
    }
    input[type="radio"]:checked + label + .book-tabs-content {
      display: block;
    }
  }

  // {{< columns >}}
  .book-columns {
    margin-left: -$padding-16;
    margin-right: -$padding-16;

    > div {
      margin: $padding-16 0;
      min-width: $body-min-width / 2;
      padding: 0 $padding-16;
    }
  }

  // {{< button >}}
  a.book-btn {
    display: inline-block;
    font-size: $font-size-14;
    color: $color-link;
    line-height: $padding-16 * 2;
    padding: 0 $padding-16;
    border: $padding-1 solid $color-link;
    border-radius: $border-radius;
    cursor: pointer;

    &:hover {
      text-decoration: none;
    }
  }

  // {{< hint >}}
  .book-hint {
    @each $name, $color in $hint-colors {
      &.#{$name} {
        border-color: $color;
        background-color: rgba($color, 0.1);
      }
    }
  }
}