Skip to content

Commit

Permalink
refactor: reduce custom CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
cotes2020 committed Apr 20, 2024
1 parent 63c5138 commit 015d567
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 24 deletions.
2 changes: 1 addition & 1 deletion _includes/mermaid.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
[...basicList].forEach((elem) => {
const svgCode = elem.textContent;
const backup = elem.parentElement;
backup.classList.add('unloaded');
backup.classList.add('d-none');
/* create mermaid node */
let mermaid = document.createElement('pre');
mermaid.classList.add('mermaid');
Expand Down
2 changes: 1 addition & 1 deletion _includes/search-results.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- The Search results -->

<div id="search-result-wrapper" class="d-flex justify-content-center unloaded">
<div id="search-result-wrapper" class="d-flex justify-content-center d-none">
<div class="col-11 content">
<div id="search-hints">
{% include_cached trending-tags.html %}
Expand Down
4 changes: 2 additions & 2 deletions _javascript/modules/components/search-display.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ const input = document.getElementById('search-input');
const hints = document.getElementById('search-hints');

// CSS class names
const LOADED = 'loaded';
const UNLOADED = 'unloaded';
const LOADED = 'd-block';
const UNLOADED = 'd-none';
const FOCUS = 'input-focus';
const FLEX = 'd-flex';

Expand Down
20 changes: 0 additions & 20 deletions _sass/addon/commons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -596,26 +596,6 @@ main {

/* --- Effects classes --- */

.loaded {
display: block !important;

@at-root .d-flex#{&} {
display: flex !important;
}
}

.unloaded {
display: none !important;
}

.visible {
visibility: visible !important;
}

.hidden {
visibility: hidden !important;
}

.flex-grow-1 {
flex-grow: 1 !important;
}
Expand Down

0 comments on commit 015d567

Please sign in to comment.