Skip to content

Commit

Permalink
Fixup some dark mode stuff...
Browse files Browse the repository at this point in the history
  • Loading branch information
cycomachead committed Aug 20, 2024
1 parent 4618586 commit 4467015
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 5 deletions.
8 changes: 8 additions & 0 deletions _sass/color_schemes/dark_overrides.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

@mixin dark-mode-overrides {

p.important-title > p:first-child,
blockquote.important-title > p:first-child {
color: #8975FF;
}
}
2 changes: 0 additions & 2 deletions _sass/color_schemes/light.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,3 @@ $search-result-preview-color: $grey-dk-000 !default;

// Minimum lightness on white.
$body-lighter-color: $grey-dk-100;

$code-background-color: #fefefe;
6 changes: 6 additions & 0 deletions _sass/custom/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,11 @@
@import '../just-the-class/just-the-class';
@import '../berkeley/berkeley';

@import '../color_schemes/dark_overrides';

@if $color-scheme == dark {
@include dark-mode-overrides;
}

// Place all of your course-specific CSS here.
@import './course_overrides';
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,30 @@
/* @author: ericwbailey */
/* Adapted to pygments/rouge by @cycomachead */

// Todo this is a bit too light.
// This needs to be set for other files.
$code-background-color: #fafafa;

:root {
--pygments-a11y-bg-color: #fefefe;
--pygments-a11y-bg-color: $code-background-color;
--pygments-a11y-light-on-dark: #FFF; /* Used for errors */
--pygments-a11y-light-gray: #696969; /* comments */
--pygments-a11y-dark-gray: #545454;
--pygments-a11y-purple: #7928a1;
--pygments-a11y-blue: #007faa;
--pygments-a11y-blue: #007f95;
--pygments-a11y-green: #008000;
--pygments-a11y-yellow: #aa5d00; /* attributes */
--pygments-a11y-orange: #aa5d00;
--pygments-a11y-red: #d91e18;
}

.highlight,
pre.highlight {
.highlight pre,
.highlight pre.highlight {
background: var(--pygments-a11y-bg-color);
color: var(--pygments-a11y-dark-gray);
border: 1px solid var(--pygments-a11y-dark-gray);
border-radius: 4px;
}

.highlight pre,
Expand Down
2 changes: 2 additions & 0 deletions docs/a11y.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ After passing all tests, add the following to your README:
```markdown
[![Run rspec tests](https://github.com/ORG/REPO/actions/workflows/rspec.yml/badge.svg)](https://github.com/ORG/REPO/actions/workflows/rspec.yml)
```
{: tabindex=0 }


## Test Details

Expand Down

0 comments on commit 4467015

Please sign in to comment.