Compare commits

..

1 commit

Author SHA1 Message Date
Harri 1df689354d
Merge 19fa1c9cbf into 705240da72 2025-12-05 16:08:40 +00:00
4 changed files with 9 additions and 8 deletions

View file

@ -44,10 +44,10 @@ function appendVersion(parent, name, segment, url) {
// The list item // The list item
const li = document.createElement("li"); const li = document.createElement("li");
if (segment === selected) { if (segment === selected) {
li.classList.add("version-picker-selected"); li.classList.add("selected");
} }
if (segment === "latest") { if (segment === "latest") {
li.classList.add("version-picker-latest"); li.classList.add("latest");
} }
parent.appendChild(li); parent.appendChild(li);

View file

@ -57,13 +57,18 @@ Custom SCSS for the Matrix spec
overflow-y: auto; overflow-y: auto;
} }
ul#version-selector li.version-picker-selected a { /* As these styles are only applied by JavaScript, PurgeCSS doesn't see them
* in the source code and removes them unless we explicitly tell it not to.
*/
/* purgecss start ignore */
ul#version-selector li.selected a {
font-weight: bold; font-weight: bold;
} }
ul#version-selector li.version-picker-latest a { ul#version-selector li.latest a {
color: $secondary; color: $secondary;
} }
/* purgecss end ignore */
} }
/* Styles for the sidebar nav */ /* Styles for the sidebar nav */

View file

@ -1 +0,0 @@
Add version picker in the navbar.

View file

@ -16,9 +16,6 @@ const purgecss = require('@fullhuman/postcss-purgecss')({
extensions: ["json"], extensions: ["json"],
}, },
], ],
// As these classes are only applied by JavaScript, PurgeCSS doesn't see them
// in the source code and removes them unless we explicitly tell it not to.
safelist: ['version-picker-selected', 'version-picker-latest']
}); });
module.exports = { module.exports = {