diff --git a/guide/advanced/javascript_interop.html b/guide/advanced/javascript_interop.html index 931fc838..a373e666 100644 --- a/guide/advanced/javascript_interop.html +++ b/guide/advanced/javascript_interop.html @@ -165,7 +165,7 @@
rust
asset type.
+see the rust
asset type.
The bindings will only be available and working when the application initialization has been completed.
If your WebAssembly application renders code into the web page/DOM tree, which then calls from JavaScript into the diff --git a/guide/book.js b/guide/book.js index 178f1e90..a5c25550 100644 --- a/guide/book.js +++ b/guide/book.js @@ -449,6 +449,7 @@ function playground_text(playground, hidden = true) { var sidebar = document.getElementById("sidebar"); var sidebarLinks = document.querySelectorAll('#sidebar a'); var sidebarToggleButton = document.getElementById("sidebar-toggle"); + var sidebarToggleAnchor = document.getElementById("sidebar-toggle-anchor"); var sidebarResizeHandle = document.getElementById("sidebar-resize-handle"); var firstContact = null; @@ -475,22 +476,16 @@ function playground_text(playground, hidden = true) { } // Toggle sidebar - sidebarToggleButton.addEventListener('click', function sidebarToggle() { - if (body.classList.contains("sidebar-hidden")) { + sidebarToggleAnchor.addEventListener('change', function sidebarToggle() { + if (sidebarToggleAnchor.checked) { var current_width = parseInt( document.documentElement.style.getPropertyValue('--sidebar-width'), 10); if (current_width < 150) { document.documentElement.style.setProperty('--sidebar-width', '150px'); } showSidebar(); - } else if (body.classList.contains("sidebar-visible")) { - hideSidebar(); } else { - if (getComputedStyle(sidebar)['transform'] === 'none') { - hideSidebar(); - } else { - showSidebar(); - } + hideSidebar(); } }); diff --git a/guide/css/chrome.css b/guide/css/chrome.css index 4cd73086..7a95c244 100644 --- a/guide/css/chrome.css +++ b/guide/css/chrome.css @@ -421,11 +421,14 @@ ul#searchresults span.teaser em { color: var(--sidebar-fg); } .sidebar-iframe-inner { + --padding: 10px; + background-color: var(--sidebar-bg); - color: var(--sidebar-fg); - padding: 10px 10px; + padding: var(--padding); margin: 0; font-size: 1.4rem; + color: var(--sidebar-fg); + min-height: calc(100vh - var(--padding) * 2); } .sidebar-iframe-outer { border: none; diff --git a/guide/css/general.css b/guide/css/general.css index 0862b516..49e72673 100644 --- a/guide/css/general.css +++ b/guide/css/general.css @@ -200,10 +200,12 @@ sup { line-height: 0; } -:not(.footnote-definition) + .footnote-definition, -.footnote-definition + :not(.footnote-definition) { +:not(.footnote-definition) + .footnote-definition { margin-block-start: 2em; } +.footnote-definition:not(:has(+ .footnote-definition)) { + margin-block-end: 2em; +} .footnote-definition { font-size: 0.9em; margin: 0.5em 0; diff --git a/guide/css/variables.css b/guide/css/variables.css index 12d1db7a..57977155 100644 --- a/guide/css/variables.css +++ b/guide/css/variables.css @@ -9,7 +9,7 @@ --content-max-width: 750px; --menu-bar-height: 50px; --mono-font: "Source Code Pro", Consolas, "Ubuntu Mono", Menlo, "DejaVu Sans Mono", monospace, monospace; - --code-font-size: 0.875em /* please adjust the ace font size accordingly in editor.js */ + --code-font-size: 0.875em; /* please adjust the ace font size accordingly in editor.js */ } /* Themes */ diff --git a/guide/mdbook-admonish.css b/guide/mdbook-admonish.css index 45aeff05..88dd2b15 100644 --- a/guide/mdbook-admonish.css +++ b/guide/mdbook-admonish.css @@ -106,6 +106,9 @@ details.admonition > summary.admonition-title::after { details[open].admonition > summary.admonition-title::after { transform: rotate(90deg); } +summary.admonition-title::-webkit-details-marker { + display: none; +} :root { --md-details-icon: url("data:image/svg+xml;charset=utf-8,"); diff --git a/guide/print.html b/guide/print.html index 598ca3db..3fca4338 100644 --- a/guide/print.html +++ b/guide/print.html @@ -677,7 +677,7 @@
wasm-bindgen
for interfacing with JavaScript functionality.
By default, functions exported from Rust, using wasm-bingen
, can be accessed in the JavaScript code through the global
variable window.wasmBindings
. This behavior can be disabled, and the name can be customized. For more information
-see the rust
asset type.
rust
asset type.
The bindings will only be available and working when the application initialization has been completed.
If your WebAssembly application renders code into the web page/DOM tree, which then calls from JavaScript into the diff --git a/guide/toc.js b/guide/toc.js index 99539dd9..131ee920 100644 --- a/guide/toc.js +++ b/guide/toc.js @@ -10,7 +10,7 @@ class MDBookSidebarScrollbox extends HTMLElement { connectedCallback() { this.innerHTML = '