Skip to content

Commit 705240d

Browse files
Prevent PurgeCSS from deleting dynamically-added version picker CSS classes (#2260)
1 parent 4dbe080 commit 705240d

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

assets/scss/_styles_project.scss

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,24 @@ Custom SCSS for the Matrix spec
5151
color: $black;
5252
}
5353

54-
/* Make the version dropdown scroll if its too large */
54+
/* Make the version dropdown scroll if it's too large */
5555
ul#version-selector {
5656
max-height: 80vh;
5757
overflow-y: auto;
5858
}
5959

60+
/* As these styles are only applied by JavaScript, PurgeCSS doesn't see them
61+
* in the source code and removes them unless we explicitly tell it not to.
62+
*/
63+
/* purgecss start ignore */
6064
ul#version-selector li.selected a {
6165
font-weight: bold;
6266
}
6367

6468
ul#version-selector li.latest a {
6569
color: $secondary;
6670
}
71+
/* purgecss end ignore */
6772
}
6873

6974
/* Styles for the sidebar nav */
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add version picker in the navbar.

0 commit comments

Comments
 (0)