Skip to content

Commit 015d567

Browse files
committed
refactor: reduce custom CSS
1 parent 63c5138 commit 015d567

File tree

4 files changed

+4
-24
lines changed

4 files changed

+4
-24
lines changed

_includes/mermaid.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
[...basicList].forEach((elem) => {
4646
const svgCode = elem.textContent;
4747
const backup = elem.parentElement;
48-
backup.classList.add('unloaded');
48+
backup.classList.add('d-none');
4949
/* create mermaid node */
5050
let mermaid = document.createElement('pre');
5151
mermaid.classList.add('mermaid');

_includes/search-results.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- The Search results -->
22

3-
<div id="search-result-wrapper" class="d-flex justify-content-center unloaded">
3+
<div id="search-result-wrapper" class="d-flex justify-content-center d-none">
44
<div class="col-11 content">
55
<div id="search-hints">
66
{% include_cached trending-tags.html %}

_javascript/modules/components/search-display.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ const input = document.getElementById('search-input');
1414
const hints = document.getElementById('search-hints');
1515

1616
// CSS class names
17-
const LOADED = 'loaded';
18-
const UNLOADED = 'unloaded';
17+
const LOADED = 'd-block';
18+
const UNLOADED = 'd-none';
1919
const FOCUS = 'input-focus';
2020
const FLEX = 'd-flex';
2121

_sass/addon/commons.scss

-20
Original file line numberDiff line numberDiff line change
@@ -596,26 +596,6 @@ main {
596596

597597
/* --- Effects classes --- */
598598

599-
.loaded {
600-
display: block !important;
601-
602-
@at-root .d-flex#{&} {
603-
display: flex !important;
604-
}
605-
}
606-
607-
.unloaded {
608-
display: none !important;
609-
}
610-
611-
.visible {
612-
visibility: visible !important;
613-
}
614-
615-
.hidden {
616-
visibility: hidden !important;
617-
}
618-
619599
.flex-grow-1 {
620600
flex-grow: 1 !important;
621601
}

0 commit comments

Comments
 (0)