~xdavidwu/xdavidwu.link

ref: 11358a12c763501d74f61e7e798cfbeceb3d7c35 xdavidwu.link/_sass/minimal-mistakes/_search.scss -rw-r--r-- 1.9 KiB
11358a12xdavidwu tweak light footer color 4 years 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
/* ==========================================================================
   SEARCH
   ========================================================================== */

.layout--search {
  .archive__item-teaser {
    margin-bottom: 0.25em;
  }
}

.search__toggle {
  margin-left: 1rem;
  margin-right: 1rem;
  height: $nav-toggle-height;
  border: 0;
  outline: none;
  color: $primary-color;
  background-color: transparent;
  cursor: pointer;
  transition: 0.2s;

  &:hover {
    color: $primary-color-raised;
  }
}

.search-icon {
  width: 100%;
  height: 100%;
}

.search-content {
  display: none;
  visibility: hidden;

  &__inner-wrap {
    padding: 1em;
    animation: $intro-transition;
    animation-delay: 0.15s;

    @include breakpoint($x-large) {
      max-width: $max-width;
    }

  }

  &__form {
    background-color: transparent;
  }

  .search-input {
    display: block;
    margin-bottom: 0;
    padding: 0;
    border: none;
    outline: none;
    box-shadow: none;
    background-color: transparent;
    font-size: $type-size-3;
    color: $text-color;

    @include breakpoint($large) {
      font-size: $type-size-2;
    }

    @include breakpoint($x-large) {
      font-size: $type-size-1;
    }
  }

  &.is--visible {
    display: block;
    visibility: visible;
  }

  .results__found {
    font-size: $type-size-6;
  }

  .archive__item {
    margin-bottom: 2em;

    @include breakpoint($large) {
      width: 75%;
    }

    @include breakpoint($x-large) {
      width: 50%;
    }
  }

  .archive__item-title {
    margin-top: 0;
  }

  .archive__item-excerpt {
    margin-bottom: 0;
  }
}

/* Algolia search */

.ais-search-box {
  max-width: 100% !important;
  margin-bottom: 2em;
}

.archive__item-title .ais-Highlight {
  color: $primary-color;
  font-style: normal;
  text-decoration: underline;
}

.archive__item-excerpt .ais-Highlight {
  color: $primary-color;
  font-style: normal;
  font-weight: bold;
}