Skip to content

Conversation

@drgrice1
Copy link
Member

The image view and knowl dialogs need to be forced into light mode. These dialogs are injected outside of the problem content div in webwork2, and so by default will display in the mode of the page. So the data-bs-theme attribute needs to be set to "light" to prevent that.

Many PG images have transparent backgrounds and so will not work with a dark background. Furthermore, the image view and knowl dialog styles themself are not set up to honor dark mode.

Note that there is another modal dialog for the quickMatrixEntry.pl macro (in the htdocs/js/QuickMatrixEntry/quickMatrixEntry.js file), but for now I have left that and allowed it to go into dark mode. That dialog works fine with dark mode already. It could be forced to light mode for consistency though. Although, does anyone actually use this?

Also ensure that the accordion buttons for scaffolds are dark so that they have sufficient contrast against the blue or green accordion header background color. Bootstrap wants to use the page text color for this, and if the primary color is light (for instance with the math4-yellow theme), that does not work.

These changes are needed for openwebwork/webwork2#2894.

The image view and knowl dialogs need to be forced into light mode.
These dialogs are injected outside of the problem content div in
webwork2, and so by default will display in the mode of the page. So the
data-bs-theme attribute needs to be set to "light" to prevent that.

Many PG images have transparent backgrounds and so will not work with a
dark background.  Furthermore, the image view and knowl dialog styles
themself are not set up to honor dark mode.

Note that there is another modal dialog for the `quickMatrixEntry.pl`
macro (in the `htdocs/js/QuickMatrixEntry/quickMatrixEntry.js` file),
but for now I have left that and allowed it to go into dark mode.  That
dialog works fine with dark mode already.  It could be forced to light
mode for consistency though.  Although, does anyone actually use this?

Also ensure that the accordion buttons for scaffolds are dark so that
they have sufficient contrast against the blue or green accordion header
background color.  Bootstrap wants to use the page text color for this,
and if the primary color is light (for instance with the math4-yellow
theme), that does not work.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant