diff --git a/src/components/Assignments/SolutionsTable/SolutionsTable.less b/src/components/Assignments/SolutionsTable/SolutionsTable.less
index 353b42edf..7c5e80228 100644
--- a/src/components/Assignments/SolutionsTable/SolutionsTable.less
+++ b/src/components/Assignments/SolutionsTable/SolutionsTable.less
@@ -21,3 +21,13 @@ table.solutionsTable td.noteRow {
table.solutionsTable tbody:hover td {
background-color: #f4f4f4;
}
+
+[data-bs-theme=dark] {
+ table.solutionsTable tbody {
+ border-top: 1px solid var(--bs-card-border-color);
+ }
+
+ table.solutionsTable tbody:hover td {
+ background-color: var(--bs-secondary-bg);
+ }
+}
\ No newline at end of file
diff --git a/src/components/Groups/ResultsTable/ResultsTable.less b/src/components/Groups/ResultsTable/ResultsTable.less
index 07e9a8a03..754079fd3 100644
--- a/src/components/Groups/ResultsTable/ResultsTable.less
+++ b/src/components/Groups/ResultsTable/ResultsTable.less
@@ -22,11 +22,20 @@
}
.bonusPoints {
- color: green;
+ color: var(--bs-success);
}
.malusPoints {
- color: red;
+ color: var(--bs-danger);
+}
+
+[data-bs-theme="dark"] {
+ .bonusPoints {
+ color: var(--bs-success-text-emphasis);
+ }
+ .malusPoints {
+ color: var(--bs-danger-text-emphasis);
+ }
}
.maxPointsRow {
diff --git a/src/components/forms/EditExerciseSimpleConfigForm/EditExerciseSimpleConfigForm.css b/src/components/forms/EditExerciseSimpleConfigForm/EditExerciseSimpleConfigForm.css
index f037cb5e3..5273a8071 100644
--- a/src/components/forms/EditExerciseSimpleConfigForm/EditExerciseSimpleConfigForm.css
+++ b/src/components/forms/EditExerciseSimpleConfigForm/EditExerciseSimpleConfigForm.css
@@ -5,14 +5,26 @@
border-bottom: 2px solid #ddd;
}
+[data-bs-theme=dark] .configRow {
+ border-bottom: 2px solid var(--bs-secondary-border-subtle);
+}
+
.configRow:nth-child(1) {
background-color: #f4fcf4 !important;
}
+[data-bs-theme=dark] .configRow:nth-child(1) {
+ background-color: #2b352c !important;
+}
+
.configRow:nth-child(odd) {
background-color: #F9F9F9;
}
+[data-bs-theme=dark] .configRow:nth-child(odd) {
+ background-color: var(--bs-tertiary-bg);
+}
+
.compilation {
overflow: auto;
}
diff --git a/src/components/forms/EditUserUIDataForm/EditUserUIDataForm.js b/src/components/forms/EditUserUIDataForm/EditUserUIDataForm.js
index 520fc21ff..bd8cc9693 100644
--- a/src/components/forms/EditUserUIDataForm/EditUserUIDataForm.js
+++ b/src/components/forms/EditUserUIDataForm/EditUserUIDataForm.js
@@ -10,6 +10,7 @@ import { SaveIcon } from '../../icons';
import Explanation from '../../widgets/Explanation';
import SubmitButton from '../SubmitButton';
import { CheckboxField, SelectField, NumericTextField } from '../Fields';
+import OnOffCheckbox from '../OnOffCheckbox';
const defaultPagesCaptions = defineMessages({
dashboard: {
diff --git a/src/components/helpers/SourceCodeViewer/SourceCodeViewer.css b/src/components/helpers/SourceCodeViewer/SourceCodeViewer.css
index 0ff109a63..3f679bbdd 100644
--- a/src/components/helpers/SourceCodeViewer/SourceCodeViewer.css
+++ b/src/components/helpers/SourceCodeViewer/SourceCodeViewer.css
@@ -156,3 +156,61 @@ pre .sourceCodeViewerComments, code .sourceCodeViewerComments {
.sourceCodeViewer.addComment .scvAddButton:hover::before {
opacity: 1;
}
+
+[data-bs-theme=dark] {
+ .sourceCodeViewer span[data-line] .linenumber {
+ background-color: #2b3035;
+ color: #b0b0b0;
+ }
+
+ .sourceCodeViewer span[data-line]:hover, .sourceCodeViewer span[data-line]:hover * {
+ background-color: #2b3035;
+ }
+
+ .sourceCodeViewer span[data-line]:hover .linenumber {
+ background-color: #343a40;
+ }
+
+ .sourceCodeViewer span[data-line-active] {
+ background-color: #333c1a;
+ }
+
+ .sourceCodeViewer span[data-line-active] .linenumber {
+ background-color: #495c1a;
+ }
+
+ .sourceCodeViewer span[data-line-active]:hover, .sourceCodeViewer span[data-line-active]:hover * {
+ background-color: #3d4420;
+ }
+
+ .sourceCodeViewer span[data-line-active]:hover .linenumber {
+ background-color: #5a6b1a;
+ }
+
+ .sourceCodeViewerComments {
+ background-color: #2b3035;
+ }
+
+ .sourceCodeViewerComments > div {
+ border: 1px solid #343a40;
+ background-color: var(--bs-card-bg);
+ }
+
+ .sourceCodeViewerComments > div.issue {
+ background-color: #3a2323;
+ }
+
+ .sourceCodeViewerComments > div.commentForm {
+ background-color: #23271a;
+ }
+
+ /* Markdown overrides */
+
+ .sourceCodeViewerComments > div > .recodex-markdown-container {
+ border-top: 1px solid #343a40;
+ }
+
+ .sourceCodeViewerComments > div.issue > .recodex-markdown-container {
+ border-top-color: #4a2a2a;
+ }
+}
\ No newline at end of file
diff --git a/src/components/helpers/SourceCodeViewer/SourceCodeViewer.js b/src/components/helpers/SourceCodeViewer/SourceCodeViewer.js
index 6bc1c1b24..551804dc5 100644
--- a/src/components/helpers/SourceCodeViewer/SourceCodeViewer.js
+++ b/src/components/helpers/SourceCodeViewer/SourceCodeViewer.js
@@ -2,12 +2,12 @@ import React from 'react';
import PropTypes from 'prop-types';
import { Prism as SyntaxHighlighter, createElement } from 'react-syntax-highlighter';
import { lruMemoize } from 'reselect';
-import { vs } from 'react-syntax-highlighter/dist/esm/styles/prism';
-import 'prismjs/themes/prism.css';
+import { prism, okaidia } from 'react-syntax-highlighter/dist/esm/styles/prism';
import ReviewCommentForm, { newCommentFormInitialValues } from '../../forms/ReviewCommentForm';
import { getPrismModeFromExtension } from '../../helpers/syntaxHighlighting.js';
import { getFileExtensionLC, canUseDOM } from '../../../helpers/common.js';
+import { UserUIDataContext } from '../../../helpers/contexts.js';
import SourceCodeComment from './SourceCodeComment.js';
import './SourceCodeViewer.css';
@@ -161,19 +161,23 @@ class SourceCodeViewer extends React.Component {
render() {
const { name, content = '', addComment } = this.props;
return canUseDOM ? (
-