From 705240da72dd39396007b5192866a39da4debb74 Mon Sep 17 00:00:00 2001 From: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> Date: Fri, 5 Dec 2025 15:19:24 +0000 Subject: [PATCH] Prevent PurgeCSS from deleting dynamically-added version picker CSS classes (#2260) --- assets/scss/_styles_project.scss | 7 ++++++- changelogs/internal/newsfragments/2260.clarification | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 changelogs/internal/newsfragments/2260.clarification diff --git a/assets/scss/_styles_project.scss b/assets/scss/_styles_project.scss index ce0ce0ee..f1054945 100644 --- a/assets/scss/_styles_project.scss +++ b/assets/scss/_styles_project.scss @@ -51,12 +51,16 @@ Custom SCSS for the Matrix spec color: $black; } - /* Make the version dropdown scroll if its too large */ + /* Make the version dropdown scroll if it's too large */ ul#version-selector { max-height: 80vh; overflow-y: auto; } + /* 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; } @@ -64,6 +68,7 @@ Custom SCSS for the Matrix spec ul#version-selector li.latest a { color: $secondary; } + /* purgecss end ignore */ } /* Styles for the sidebar nav */ diff --git a/changelogs/internal/newsfragments/2260.clarification b/changelogs/internal/newsfragments/2260.clarification new file mode 100644 index 00000000..de578d64 --- /dev/null +++ b/changelogs/internal/newsfragments/2260.clarification @@ -0,0 +1 @@ +Add version picker in the navbar. \ No newline at end of file