|
82 | 82 | /**
|
83 | 83 | * The search modal <dialog>
|
84 | 84 | */
|
85 |
| -#pst-search-dialog { |
86 |
| - display: none; |
87 |
| - |
88 |
| - &[open] { |
89 |
| - display: flex; |
90 |
| - |
91 |
| - // Center in middle of screen just underneath header |
92 |
| - position: fixed; |
93 |
| - z-index: $zindex-modal; |
94 |
| - top: 30%; |
95 |
| - left: 50%; |
96 |
| - transform: translate(-50%, -30%); |
97 |
| - right: 1rem; |
98 |
| - margin-bottom: 0; |
99 |
| - margin-top: 0.5rem; |
100 |
| - width: 90%; |
101 |
| - max-width: 800px; |
102 |
| - background-color: transparent; |
103 |
| - padding: $focus-ring-width; |
104 |
| - border: none; |
105 |
| - flex-direction: column; |
106 |
| - height: 80vh; |
| 85 | +#pst-search-dialog[open] { |
| 86 | + margin: 15vh auto 0; // an open modal dialog has a fixed position, so these margins bring it 15% down the viewport height and center it horizontally |
| 87 | + width: 90%; |
| 88 | + max-width: 800px; |
| 89 | + background-color: transparent; |
| 90 | + padding: $focus-ring-width; |
| 91 | + border: none; |
| 92 | + height: 80vh; |
| 93 | + |
| 94 | + &::backdrop { |
| 95 | + background-color: black; |
| 96 | + opacity: 0.5; |
| 97 | + } |
| 98 | + |
| 99 | + form.bd-search { |
| 100 | + flex-grow: 0; |
107 | 101 |
|
108 |
| - &::backdrop { |
109 |
| - background-color: black; |
110 |
| - opacity: 0.5; |
| 102 | + // Font and input text a bit bigger |
| 103 | + svg, |
| 104 | + input { |
| 105 | + font-size: var(--pst-font-size-icon); |
111 | 106 | }
|
| 107 | + } |
112 | 108 |
|
113 |
| - form.bd-search { |
114 |
| - flex-grow: 0; |
| 109 | + /* In pydata-sphinx-theme.js this container is appended below |
| 110 | + * the query input node after the user types their search query. |
| 111 | + * Search results are populated into this container using Sphinx's |
| 112 | + * built-in, JS-powered local search tools. */ |
| 113 | + #search-results { |
| 114 | + overflow-y: scroll; |
| 115 | + background-color: var(--pst-color-background); |
| 116 | + padding: 1em; |
115 | 117 |
|
116 |
| - // Font and input text a bit bigger |
117 |
| - svg, |
118 |
| - input { |
119 |
| - font-size: var(--pst-font-size-icon); |
120 |
| - } |
| 118 | + a { |
| 119 | + color: var(--pst-color-link); |
121 | 120 | }
|
122 | 121 |
|
123 |
| - /* In pydata-sphinx-theme.js this container is appended below |
124 |
| - * the query input node after the user types their search query. |
125 |
| - * Search results are populated into this container using Sphinx's |
126 |
| - * built-in, JS-powered local search tools. */ |
127 |
| - #search-results { |
128 |
| - overflow-y: scroll; |
129 |
| - background-color: var(--pst-color-background); |
130 |
| - padding: 1em; |
131 |
| - |
132 |
| - a { |
133 |
| - color: var(--pst-color-link); |
134 |
| - } |
135 |
| - |
136 |
| - &.empty { |
137 |
| - display: none; |
138 |
| - } |
| 122 | + &.empty { |
| 123 | + display: none; |
139 | 124 | }
|
140 | 125 | }
|
141 | 126 | }
|
|
0 commit comments