Skip to content

Commit

Permalink
CSS: clean up some classes
Browse files Browse the repository at this point in the history
There were some values hard-coded in the html attributes,
but we already were setting them in our css.

Also, search__backdrop was basically the same as search__outer__wrapper
  • Loading branch information
stsewd committed Dec 17, 2020
1 parent 5b32d91 commit 9e7cb89
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 21 deletions.
14 changes: 1 addition & 13 deletions sphinx_search/static/css/rtd_sphinx_search.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,14 @@
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 700;
}

/* Backdrop */

.search__backdrop {
/* Positioning */
position: fixed;
top: 0;
left: 0;
z-index: 500;

/* Display and box model */
width: 100%;
height: 100%;
display: none;

/* Other */
z-index: 700;
background-color: rgba(0, 0, 0, 0.502);
}

Expand Down
2 changes: 1 addition & 1 deletion sphinx_search/static/css/rtd_sphinx_search.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions sphinx_search/static/js/rtd_sphinx_search.js
Original file line number Diff line number Diff line change
Expand Up @@ -546,15 +546,15 @@ const fetchAndGenerateResults = (search_url, projectName) => {
*/
const generateAndReturnInitialHtml = () => {
let initialHtml =
'<div class="search__outer__wrapper search__backdrop"> \
'<div class="search__outer__wrapper"> \
<div class="search__outer"> \
<div class="search__cross" title="Close"> \
<!--?xml version="1.0" encoding="UTF-8"?--> \
<svg class="search__cross__img" width="15px" height="15px" enable-background="new 0 0 612 612" version="1.1" viewBox="0 0 612 612" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"> \
<svg class="search__cross__img" enable-background="new 0 0 612 612" version="1.1" viewBox="0 0 612 612" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"> \
<polygon points="612 36.004 576.52 0.603 306 270.61 35.478 0.603 0 36.004 270.52 306.01 0 576 35.478 611.4 306 341.41 576.52 611.4 612 576 341.46 306.01"></polygon> \
</svg> \
</div> \
<input class="search__outer__input" placeholder="Search ..."> \
<input class="search__outer__input" placeholder="Search..."> \
<span class="bar"></span> \
</div> \
<div class="rtd__search__credits"> \
Expand Down
Loading

0 comments on commit 9e7cb89

Please sign in to comment.