aboutsummaryrefslogtreecommitdiff
path: root/docs/_static
diff options
context:
space:
mode:
authorJosh <[email protected]>2020-05-29 17:25:13 +1000
committerRapptz <[email protected]>2020-12-18 21:18:51 -0500
commit9653ec5188b2081cf6f8998406690141c9e54ecc (patch)
treedca134fcbc423e03d47b7c4cf8202a4da3fd7c1e /docs/_static
parent[matrix] Dark Theme (diff)
downloaddiscord.py-9653ec5188b2081cf6f8998406690141c9e54ecc.tar.xz
discord.py-9653ec5188b2081cf6f8998406690141c9e54ecc.zip
[matrix] Modal cleanup
* General modal cleanup * Remove second scrollbar caused by modal
Diffstat (limited to 'docs/_static')
-rw-r--r--docs/_static/custom.js10
-rw-r--r--docs/_static/style.css6
2 files changed, 12 insertions, 4 deletions
diff --git a/docs/_static/custom.js b/docs/_static/custom.js
index 3f0e50d1..94de08a0 100644
--- a/docs/_static/custom.js
+++ b/docs/_static/custom.js
@@ -9,7 +9,7 @@ let sidebar;
function closeModal(modal) {
activeModal = null;
- modal.style.display = 'none';
+ modal.hidden = true;
}
function openModal(modal) {
@@ -18,7 +18,7 @@ function openModal(modal) {
}
activeModal = modal;
- modal.style.removeProperty('display');
+ modal.hidden = false;
}
function updateSetting(element) {
@@ -30,7 +30,11 @@ function updateSetting(element) {
function getRootAttributeToggle(attributeName, valueName) {
function toggleRootAttribute(set) {
- document.documentElement.setAttribute(`data-${attributeName}`, set ? valueName : null);
+ if (set) {
+ document.documentElement.setAttribute(`data-${attributeName}`, valueName);
+ } else {
+ document.documentElement.removeAttribute(`data-${attributeName}`);
+ }
}
return toggleRootAttribute;
}
diff --git a/docs/_static/style.css b/docs/_static/style.css
index d8b6a2cb..c06d7cdb 100644
--- a/docs/_static/style.css
+++ b/docs/_static/style.css
@@ -303,7 +303,7 @@ div.modal {
top: 0;
width: 100%;
height: 100%;
- overflow: auto;
+ overflow: hidden;
background-color: rgba(0,0,0,0.4);
cursor: pointer;
}
@@ -334,6 +334,10 @@ div.modal-content > span.close:focus {
color: #444;
}
+div.modal input {
+ cursor: pointer;
+}
+
/* copy button */
.relative-copy {