Skip to content

Commit a0938d7

Browse files
authored
Merge pull request #902 from reshma045/issue887-branch
Fix: Improve image visibility in dark mode by inverting images
2 parents 90261ed + a43196d commit a0938d7

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/content/contributor-docs/en/fes_contribution_guide.mdx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ description: >
77
---
88
{/* An overview of the Friendly Error System codebase and a reference for developers. */}
99

10-
10+
import { Image } from 'astro:assets';
11+
import fesDiagram from '../images/fes.svg';
1112

1213
The `core/friendly_errors` folder contains the code for the p5js’ Friendly Error Systems (FES) responsible for generating Friendly Error messages or Friendly Errors. You may have seen Friendly Error messages starting with “`🌸 p5.js says:`” in your console, supplementing default, browser-generated error messages.
1314

@@ -26,7 +27,11 @@ The main functions for generating the Friendly Error messages are:
2627

2728
Here is a diagram that outlines the location of all functions in FES and how they connect to others:
2829

29-
![A diagram of the files used in FES and their uses](src/content/contributor-docs/images/fes.svg)
30+
<Image
31+
src={fesDiagram}
32+
alt="A diagram of the files used in FES and their uses"
33+
class="invert-in-dark"
34+
/>
3035

3136
Individual files contain the following main FES functions:
3237

styles/global.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,10 @@ pre.code-box,
409409
}
410410
}
411411

412+
.dark-theme .invert-in-dark {
413+
filter: invert(100%);
414+
}
415+
412416
// Grid that switches from 2 to 3 to 4 columns as screen gets bigger
413417
// Usually used with items that have a column width of 3
414418
.content-grid {

0 commit comments

Comments
 (0)