Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions htdocs/js/ImageView/imageview.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@
modal.setAttribute('aria-label', 'image view dialog');
modal.tabIndex = -1;

// Force the dialog into light mode. This is needed for a webwork2 page in dark mode since the dialog is outside
// of the problem content. At least until PG is updated to honor dark mode. Further discussion on this will
// also be needed at that time since many images have transparent backgrounds that will not work with a dark
// background.
modal.dataset.bsTheme = 'light';

const dialog = document.createElement('div');
dialog.classList.add('modal-dialog');

Expand Down
4 changes: 4 additions & 0 deletions htdocs/js/Knowls/knowl.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
knowl.knowlModal.setAttribute('aria-labelledby', `${knowl.knowlModal.id}-title`);
knowl.knowlModal.setAttribute('aria-hidden', 'true');

// Force the dialog into light mode. This is needed for a webwork2 page in dark mode since the dialog is
// outside of the problem content. At least until PG and the help files are updated to honor dark mode.
knowl.knowlModal.dataset.bsTheme = 'light';

const knowlDialog = document.createElement('div');
knowlDialog.classList.add(
'knowl-dialog',
Expand Down
7 changes: 7 additions & 0 deletions htdocs/js/Scaffold/scaffold.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
min-width: 1.25rem;
font-weight: bold;
}

// Force the accordion button to a dark color so that it has sufficient contrast even if the page is in dark
// mode. Bootstrap wants to use the dark mode color for this if the page is in dark mode.
&::after {
--bs-accordion-btn-icon: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23212529' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 16 16'%3E%3Cpath d='m2 5 6 6 6-6'/%3E%3C/svg%3E");
--bs-accordion-btn-active-icon: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23001436' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 16 16'%3E%3Cpath d='m2 5 6 6 6-6'/%3E%3C/svg%3E");
}
}

&.cannotopen > button.accordion-button::after {
Expand Down