_algolia.scss 3.58 KB
Newer Older
XhmikosR's avatar
XhmikosR committed
1
2
// stylelint-disable declaration-no-important

3
4
5
6
7
8
9
10
11
12
13
14
// Docsearch overrides
//
// `!important` indicates overridden properties.
.algolia-autocomplete {
  display: block !important;
  flex: 1;

  // Menu container
  .ds-dropdown-menu {
    width: 100%;
    min-width: 0 !important;
    max-width: none !important;
Mark Otto's avatar
Mark Otto committed
15
    padding: .75rem 0 !important;
16
17
    background-color: #fff;
    background-clip: padding-box;
18
19
    border: 1px solid rgba(0, 0, 0, .1);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .175);
20

Mark Otto's avatar
Mark Otto committed
21
22
23
24
    @include media-breakpoint-up(md) {
      width: 175%;
    }

25
26
27
28
29
    // Caret
    &::before {
      display: none !important;
    }

XhmikosR's avatar
XhmikosR committed
30
    [class^="ds-dataset-"] {
31
32
      padding: 0 !important;
      overflow: visible !important;
33
34
35
      background-color: transparent !important;
      border: 0 !important;
    }
36
37
38
39
40
41
42
43
44

    .ds-suggestions {
      margin-top: 0 !important;
    }
  }

  .algolia-docsearch-suggestion {
    padding: 0 !important;
    overflow: visible !important;
45
46
47
  }

  .algolia-docsearch-suggestion--category-header {
Mark Otto's avatar
Mark Otto committed
48
    padding: .125rem 1rem !important;
49
    margin-top: 0 !important;
Mark Otto's avatar
Mark Otto committed
50
    font-size: .875rem !important;
51
    font-weight: 500 !important;
Mark Otto's avatar
Mark Otto committed
52
    color: $bd-purple-bright !important;
53
54
55
56
    border-bottom: 0 !important;
  }

  .algolia-docsearch-suggestion--wrapper {
57
    float: none !important;
58
59
60
61
62
63
64
65
66
67
68
    padding-top: 0 !important;
  }

  // Section header
  .algolia-docsearch-suggestion--subcategory-column {
    float: none !important;
    width: auto !important;
    padding: 0 !important;
    text-align: left !important;
  }

69
70
71
72
73
74
75
76
77
78
79
  .algolia-docsearch-suggestion--subcategory-inline {
    display: block !important;
    font-size: .875rem;
    color: $gray-700;

    &::after {
      padding: 0 .25rem;
      content: "/";
    }
  }

80
  .algolia-docsearch-suggestion--content {
81
82
    display: flex;
    flex-wrap: wrap;
83
    float: none !important;
84
    width: 100% !important;
85
    padding: .25rem 1rem !important;
86
87
88
89
90
91
92
93
94
95

    // Vertical divider between column header and content
    &::before {
      display: none !important;
    }
  }

  .ds-suggestion {
    &:not(:first-child) {
      .algolia-docsearch-suggestion--category-header {
Mark Otto's avatar
Mark Otto committed
96
97
        padding-top: .75rem !important;
        margin-top: .75rem !important;
98
        border-top: 1px solid rgba(0, 0, 0, .1);
99
100
101
102
103
104
105
106
107
      }
    }

    .algolia-docsearch-suggestion--subcategory-column {
      display: none !important;
    }
  }

  .algolia-docsearch-suggestion--title {
108
    display: block;
Mark Otto's avatar
Mark Otto committed
109
    margin-bottom: 0 !important;
110
111
112
113
    font-size: .875rem !important;
    font-weight: 400 !important;
  }

Mark Otto's avatar
Mark Otto committed
114
  .algolia-docsearch-suggestion--text {
115
116
117
118
    flex: 0 0 100%;
    max-width: 100%;
    padding: .2rem 0;
    font-size: .8125rem !important;
XhmikosR's avatar
XhmikosR committed
119
    font-weight: 400;
Mark Otto's avatar
Mark Otto committed
120
    line-height: 1.25 !important;
121
    color: $gray-600;
Mark Otto's avatar
Mark Otto committed
122
123
  }

124
  .algolia-docsearch-footer {
125
126
127
    float: none !important;
    width: auto !important;
    height: auto !important;
Mark Otto's avatar
Mark Otto committed
128
129
    padding: .75rem 1rem 0;
    font-size: .75rem !important;
130
131
    line-height: 1 !important;
    color: #767676 !important;
132
    border-top: 1px solid rgba(0, 0, 0, .1);
133
134
135
136
137
138
139
140
  }

  .algolia-docsearch-footer--logo {
    display: inline !important;
    overflow: visible !important;
    color: inherit !important;
    text-indent: 0 !important;
    background: none !important;
141
142
143
144
145
146
147
148
  }

  .algolia-docsearch-suggestion--highlight {
    color: #5f2dab;
    background-color: rgba(154, 132, 187, .12);
  }

  .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight {
149
    box-shadow: inset 0 -2px 0 0 rgba(95, 45, 171, .5) !important;
150
151
152
  }

  .ds-suggestion.ds-cursor .algolia-docsearch-suggestion--content {
153
    background-color: rgba(208, 189, 236, .15) !important;
154
155
  }
}