File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
resources/formats/html/templates Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ export async function resolveSassBundles(
144144 bundle . key = bundle . key + "-dark" ;
145145 return bundle ;
146146 } ) ;
147- targets . push ( {
147+ targets . unshift ( {
148148 name : `${ dependency } -dark.min.css` ,
149149 bundles : darkBundles as any ,
150150 attribs : {
Original file line number Diff line number Diff line change 1515 }
1616
1717 const toggleBodyColorPrimary = () => {
18- const bsSheetEl = window .document .querySelector (" link#quarto-bootstrap" );
18+ const bsSheetEl = window .document .querySelector (" link#quarto-bootstrap:not([rel=disabled-stylesheet]) " );
1919 if (bsSheetEl) {
2020 toggleBodyColorMode (bsSheetEl);
2121 }
2626
2727 const toggleColorMode = (alternate ) => {
2828 // Switch the stylesheets
29+ const primaryStylesheets = window .document .querySelectorAll (' link.quarto-color-scheme:not(.quarto-color-alternate)' );
2930 const alternateStylesheets = window .document .querySelectorAll (' link.quarto-color-scheme.quarto-color-alternate' );
3031 manageTransitions (' #quarto-margin-sidebar .nav-link' , false );
3132 if (alternate) {
33+ disableStylesheet (primaryStylesheets)
3234 enableStylesheet (alternateStylesheets);
3335 for (const sheetNode of alternateStylesheets) {
3436 if (sheetNode .id === " quarto-bootstrap" ) {
3739 }
3840 } else {
3941 disableStylesheet (alternateStylesheets);
42+ enableStylesheet (primaryStylesheets)
4043 toggleBodyColorPrimary ();
4144 }
4245 manageTransitions (' #quarto-margin-sidebar .nav-link' , true );
You can’t perform that action at this time.
0 commit comments